diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-02 17:04:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-02 17:04:28 +0000 |
commit | 5b8852e4400e5f519018c4aa73f2ef5e4bcf8a86 (patch) | |
tree | 9d57db23fd56bf50f8d4bbfdbff83b8244390189 /src/include/gnunet_conversation_service.h | |
parent | dc30009133e6c1021ac293469e69ff4043155b15 (diff) | |
download | gnunet-5b8852e4400e5f519018c4aa73f2ef5e4bcf8a86.tar.gz gnunet-5b8852e4400e5f519018c4aa73f2ef5e4bcf8a86.zip |
-indentation, minor stylistic fixes
Diffstat (limited to 'src/include/gnunet_conversation_service.h')
-rw-r--r-- | src/include/gnunet_conversation_service.h | 97 |
1 files changed, 49 insertions, 48 deletions
diff --git a/src/include/gnunet_conversation_service.h b/src/include/gnunet_conversation_service.h index efe4c4d4c..ef02aaf11 100644 --- a/src/include/gnunet_conversation_service.h +++ b/src/include/gnunet_conversation_service.h | |||
@@ -40,6 +40,7 @@ extern "C" | |||
40 | */ | 40 | */ |
41 | #define GNUNET_CONVERSATION_VERSION 0x00000001 | 41 | #define GNUNET_CONVERSATION_VERSION 0x00000001 |
42 | 42 | ||
43 | |||
43 | enum GNUNET_CONVERSATION_RejectReason | 44 | enum GNUNET_CONVERSATION_RejectReason |
44 | { | 45 | { |
45 | GNUNET_CONVERSATION_REJECT_REASON_GENERIC = 0, | 46 | GNUNET_CONVERSATION_REJECT_REASON_GENERIC = 0, |
@@ -51,6 +52,7 @@ enum GNUNET_CONVERSATION_RejectReason | |||
51 | 52 | ||
52 | }; | 53 | }; |
53 | 54 | ||
55 | |||
54 | enum GNUNET_CONVERSATION_NotificationType | 56 | enum GNUNET_CONVERSATION_NotificationType |
55 | { | 57 | { |
56 | GNUNET_CONVERSATION_NT_SERVICE_BLOCKED = 0, | 58 | GNUNET_CONVERSATION_NT_SERVICE_BLOCKED = 0, |
@@ -62,17 +64,16 @@ enum GNUNET_CONVERSATION_NotificationType | |||
62 | }; | 64 | }; |
63 | 65 | ||
64 | 66 | ||
65 | |||
66 | /** | 67 | /** |
67 | * | 68 | * |
68 | */ | 69 | */ |
69 | struct GNUNET_CONVERSATION_MissedCall | 70 | struct GNUNET_CONVERSATION_MissedCall |
70 | { | 71 | { |
71 | struct GNUNET_PeerIdentity peer; | 72 | struct GNUNET_PeerIdentity peer; |
72 | struct GNUNET_TIME_Absolute time; | 73 | struct GNUNET_TIME_Absolute time; |
73 | |||
74 | }; | 74 | }; |
75 | 75 | ||
76 | |||
76 | struct GNUNET_CONVERSATION_MissedCallNotification | 77 | struct GNUNET_CONVERSATION_MissedCallNotification |
77 | { | 78 | { |
78 | int number; | 79 | int number; |
@@ -80,8 +81,10 @@ struct GNUNET_CONVERSATION_MissedCallNotification | |||
80 | }; | 81 | }; |
81 | 82 | ||
82 | struct GNUNET_CONVERSATION_CallInformation; | 83 | struct GNUNET_CONVERSATION_CallInformation; |
84 | |||
83 | struct GNUNET_CONVERSATION_Handle; | 85 | struct GNUNET_CONVERSATION_Handle; |
84 | 86 | ||
87 | |||
85 | /** | 88 | /** |
86 | * Method called whenever a call is incoming | 89 | * Method called whenever a call is incoming |
87 | * | 90 | * |
@@ -90,27 +93,24 @@ struct GNUNET_CONVERSATION_Handle; | |||
90 | * @param caller peer that calls you | 93 | * @param caller peer that calls you |
91 | */ | 94 | */ |
92 | typedef void (GNUNET_CONVERSATION_CallHandler) (void *cls, | 95 | typedef void (GNUNET_CONVERSATION_CallHandler) (void *cls, |
93 | struct | 96 | struct |
94 | GNUNET_CONVERSATION_Handle | 97 | GNUNET_CONVERSATION_Handle *handle, |
95 | * handle, | 98 | const struct GNUNET_PeerIdentity *caller); |
96 | const struct | 99 | |
97 | GNUNET_PeerIdentity * caller); | ||
98 | 100 | ||
99 | /** | 101 | /** |
100 | * Method called whenever a call is rejected | 102 | * Method called whenever a call is rejected |
101 | * | 103 | * |
102 | * @param cls closure | 104 | * @param cls closure |
103 | * @param handle to the conversation session | 105 | * @param handle to the conversation session |
106 | * @param reason reason given for rejecting the call | ||
104 | * @param peer peer that rejected your call | 107 | * @param peer peer that rejected your call |
105 | */ | 108 | */ |
106 | typedef void (GNUNET_CONVERSATION_RejectHandler) (void *cls, | 109 | typedef void (GNUNET_CONVERSATION_RejectHandler) (void *cls, |
107 | struct | 110 | struct GNUNET_CONVERSATION_Handle *handle, |
108 | GNUNET_CONVERSATION_Handle | 111 | enum GNUNET_CONVERSATION_RejectReason reason, |
109 | * handle, | 112 | const struct GNUNET_PeerIdentity *peer); |
110 | int | 113 | |
111 | reason, | ||
112 | const struct | ||
113 | GNUNET_PeerIdentity * peer); | ||
114 | 114 | ||
115 | /** | 115 | /** |
116 | * Method called whenever a notification is there | 116 | * Method called whenever a notification is there |
@@ -121,13 +121,10 @@ typedef void (GNUNET_CONVERSATION_RejectHandler) (void *cls, | |||
121 | * @param peer peer that the notification is about | 121 | * @param peer peer that the notification is about |
122 | */ | 122 | */ |
123 | typedef void (GNUNET_CONVERSATION_NotificationHandler) (void *cls, | 123 | typedef void (GNUNET_CONVERSATION_NotificationHandler) (void *cls, |
124 | struct | 124 | struct GNUNET_CONVERSATION_Handle *handle, |
125 | GNUNET_CONVERSATION_Handle | 125 | enum GNUNET_CONVERSATION_NotificationType type, |
126 | * handle, | 126 | const struct GNUNET_PeerIdentity *peer); |
127 | int | 127 | |
128 | type, | ||
129 | const struct | ||
130 | GNUNET_PeerIdentity * peer); | ||
131 | 128 | ||
132 | /** | 129 | /** |
133 | * Method called whenever a notification for missed calls is there | 130 | * Method called whenever a notification for missed calls is there |
@@ -137,12 +134,9 @@ typedef void (GNUNET_CONVERSATION_NotificationHandler) (void *cls, | |||
137 | * @param missed_calls a list of missed calls | 134 | * @param missed_calls a list of missed calls |
138 | */ | 135 | */ |
139 | typedef void (GNUNET_CONVERSATION_MissedCallHandler) (void *cls, | 136 | typedef void (GNUNET_CONVERSATION_MissedCallHandler) (void *cls, |
140 | struct | 137 | struct GNUNET_CONVERSATION_Handle *handle, |
141 | GNUNET_CONVERSATION_Handle | 138 | struct GNUNET_CONVERSATION_MissedCallNotification *missed_calls); |
142 | * handle, | 139 | |
143 | struct | ||
144 | GNUNET_CONVERSATION_MissedCallNotification | ||
145 | * missed_calls); | ||
146 | 140 | ||
147 | /** | 141 | /** |
148 | * Connect to the VoIP service | 142 | * Connect to the VoIP service |
@@ -152,27 +146,26 @@ typedef void (GNUNET_CONVERSATION_MissedCallHandler) (void *cls, | |||
152 | * @param call_handler the callback which is called when a call is incoming | 146 | * @param call_handler the callback which is called when a call is incoming |
153 | * @param reject_handler the callback which is called when a call is rejected | 147 | * @param reject_handler the callback which is called when a call is rejected |
154 | * @param notification_handler the callback which is called when there is a notification | 148 | * @param notification_handler the callback which is called when there is a notification |
155 | * @param missed_call_handler the callback which is called when the service notifies the client aabout missed clients | 149 | * @param missed_call_handler the callback which is called when the service notifies the client about missed clients |
156 | * @return handle to the connection to the conversation service | 150 | * @return handle to the connection to the conversation service |
157 | */ | 151 | */ |
158 | struct GNUNET_CONVERSATION_Handle *GNUNET_CONVERSATION_connect (const struct | 152 | struct GNUNET_CONVERSATION_Handle * |
159 | GNUNET_CONFIGURATION_Handle | 153 | GNUNET_CONVERSATION_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
160 | *cfg, void *cls, | 154 | void *cls, |
161 | GNUNET_CONVERSATION_CallHandler * | 155 | GNUNET_CONVERSATION_CallHandler call_handler, |
162 | call_handler, | 156 | GNUNET_CONVERSATION_RejectHandler reject_handler, |
163 | GNUNET_CONVERSATION_RejectHandler * | 157 | GNUNET_CONVERSATION_NotificationHandler notification_handler, |
164 | reject_handler, | 158 | GNUNET_CONVERSATION_MissedCallHandler missed_call_handler); |
165 | GNUNET_CONVERSATION_NotificationHandler | 159 | |
166 | * notification_handler, | ||
167 | GNUNET_CONVERSATION_MissedCallHandler | ||
168 | * missed_call_handler); | ||
169 | 160 | ||
170 | /** | 161 | /** |
171 | * Disconnect from the VoIP service | 162 | * Disconnect from the VoIP service |
172 | * | 163 | * |
173 | * @param handle handle to the VoIP connection | 164 | * @param handle handle to the VoIP connection |
174 | */ | 165 | */ |
175 | void GNUNET_CONVERSATION_disconnect (struct GNUNET_CONVERSATION_Handle *handle); | 166 | void |
167 | GNUNET_CONVERSATION_disconnect (struct GNUNET_CONVERSATION_Handle *handle); | ||
168 | |||
176 | 169 | ||
177 | /** | 170 | /** |
178 | * Establish a call | 171 | * Establish a call |
@@ -182,29 +175,37 @@ void GNUNET_CONVERSATION_disconnect (struct GNUNET_CONVERSATION_Handle *handle); | |||
182 | * @param doGnsLookup 0 = no GNS lookup or 1 = GNS lookup | 175 | * @param doGnsLookup 0 = no GNS lookup or 1 = GNS lookup |
183 | */ | 176 | */ |
184 | void | 177 | void |
185 | GNUNET_CONVERSATION_call (struct GNUNET_CONVERSATION_Handle *handle, const char *callee, | 178 | GNUNET_CONVERSATION_call (struct GNUNET_CONVERSATION_Handle *handle, |
186 | int doGnsLookup); | 179 | const char *callee, |
180 | int doGnsLookup); | ||
181 | |||
187 | 182 | ||
188 | /** | 183 | /** |
189 | * Terminate the active call | 184 | * Terminate the active call |
190 | * | 185 | * |
191 | * @param handle handle to the VoIP connection | 186 | * @param handle handle to the VoIP connection |
192 | */ | 187 | */ |
193 | void GNUNET_CONVERSATION_hangup (struct GNUNET_CONVERSATION_Handle *handle); | 188 | void |
189 | GNUNET_CONVERSATION_hangup (struct GNUNET_CONVERSATION_Handle *handle); | ||
190 | |||
194 | 191 | ||
195 | /** | 192 | /** |
196 | * Accept an incoming call | 193 | * Accept an incoming call |
197 | * | 194 | * |
198 | * @param handle handle to the VoIP connection | 195 | * @param handle handle to the VoIP connection |
199 | */ | 196 | */ |
200 | void GNUNET_CONVERSATION_accept (struct GNUNET_CONVERSATION_Handle *handle); | 197 | void |
198 | GNUNET_CONVERSATION_accept (struct GNUNET_CONVERSATION_Handle *handle); | ||
199 | |||
201 | 200 | ||
202 | /** | 201 | /** |
203 | * Reject an incoming call | 202 | * Reject an incoming call |
204 | * | 203 | * |
205 | * @param handle handle to the VoIP connection | 204 | * @param handle handle to the VoIP connection |
206 | */ | 205 | */ |
207 | void GNUNET_CONVERSATION_reject (struct GNUNET_CONVERSATION_Handle *handle); | 206 | void |
207 | GNUNET_CONVERSATION_reject (struct GNUNET_CONVERSATION_Handle *handle); | ||
208 | |||
208 | 209 | ||
209 | #if 0 /* keep Emacsens' auto-indent happy */ | 210 | #if 0 /* keep Emacsens' auto-indent happy */ |
210 | { | 211 | { |