1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
;;; constants.el --- Constants used in the Telepathy Implementation.
;;
;; Copyright (C) 2010, 2011 Jan Moringen
;;
;; Author: Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
;; Keywords: telepathy, communication, instant messaging
;;
;; This Program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This Program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses>.
;;; Commentary:
;;
;; This file contains some constants which are relevant in the
;; telepathy context.
;;; History:
;;
;; 0.1 - Initial version
;;; Code:
;;
;;; Telepathy Dictionary Key Constants
;;
(defconst telepathy-key-channel-type
"org.freedesktop.Telepathy.Channel.ChannelType"
"")
(defconst telepathy-key-target-handle-type
"org.freedesktop.Telepathy.Channel.TargetHandleType"
"")
(defconst telepathy-key-target-handle
"org.freedesktop.Telepathy.Channel.TargetHandle"
"")
(defconst telepathy-key-service
"org.freedesktop.Telepathy.Channel.Type.StreamTube.Service"
"")
;;; Tube Type Constants.
;;
(defconst telepathy-tube-type-stream
"org.freedesktop.Telepathy.Channel.Type.StreamTube"
"")
(defun telepathy-keyword->tube-type (keyword)
"May KEYWORD to the corresponding `telepathy-tube-type-*'."
(case keyword
(:stream telepathy-tube-type-stream)))
;;; Handle Type Constants.
;;
(defconst telepathy-handle-type-none 0
"")
(defconst telepathy-handle-type-contact 1
"")
(defconst telepathy-handle-type-room 2
"")
(defconst telepathy-handle-type-?1 3
"")
(defconst telepathy-handle-type-?2 4
"")
(defun telepathy-keyword->handle-type (keyword)
"Map KEYWORD to one of the `telepathy-handle-type-*'
constants."
(case keyword
(:none telepathy-handle-type-none)
(:contact telepathy-handle-type-contact)
(:room telepathy-handle-type-room)))
;;; Socket Type Constants.
;;
(defconst telepathy-tube-socket-type-unix 0
"")
(defconst telepathy-tube-socket-type-abstract 1
"")
(defconst telepathy-tube-socket-type-ipv4 2
"")
(defconst telepathy-tube-scoket-type-ipv6 3
"")
(defun telepathy-keyword->socket-type (keyword)
"Map KEYWORD to one of the `telepathy-tube-socket-type-*'
constants."
(case keyword
(:unix telepathy-tube-socket-type-unix)
(:abstract telepathy-tube-socket-type-abstract)
(:ipv4 telepathy-tube-socket-type-ipv4)
(:ipv6 telepathy-tube-socket-type-ipv6)))
(provide 'telepathy/constants)
;;; constants.el ends here
|