aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-03 13:50:35 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-03 13:50:35 +0000
commit653dc47fa8ab2e2f36c4ca494fcb6510cdc9d46a (patch)
tree2f2dca0370c0713e508fe188eedae1efb8d65671 /src/include
parent4954b2047093f62c866d145ece0d2304b76a428f (diff)
downloadgnunet-653dc47fa8ab2e2f36c4ca494fcb6510cdc9d46a.tar.gz
gnunet-653dc47fa8ab2e2f36c4ca494fcb6510cdc9d46a.zip
-finishing first round of conversation phone API implementation
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_client_lib.h7
-rw-r--r--src/include/gnunet_conversation_service.h14
-rw-r--r--src/include/gnunet_mq_lib.h3
-rw-r--r--src/include/gnunet_namestore_service.h6
-rw-r--r--src/include/gnunet_protocols.h30
5 files changed, 52 insertions, 8 deletions
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h
index e4cdd26cc..37f152d97 100644
--- a/src/include/gnunet_client_lib.h
+++ b/src/include/gnunet_client_lib.h
@@ -80,8 +80,7 @@ GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *client);
80 * @param msg message received, NULL on timeout or fatal error 80 * @param msg message received, NULL on timeout or fatal error
81 */ 81 */
82typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls, 82typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls,
83 const struct GNUNET_MessageHeader 83 const struct GNUNET_MessageHeader *msg);
84 *msg);
85 84
86 85
87/** 86/**
@@ -129,8 +128,8 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *client,
129 size_t size, 128 size_t size,
130 struct GNUNET_TIME_Relative timeout, 129 struct GNUNET_TIME_Relative timeout,
131 int auto_retry, 130 int auto_retry,
132 GNUNET_CONNECTION_TransmitReadyNotify 131 GNUNET_CONNECTION_TransmitReadyNotify notify,
133 notify, void *notify_cls); 132 void *notify_cls);
134 133
135 134
136/** 135/**
diff --git a/src/include/gnunet_conversation_service.h b/src/include/gnunet_conversation_service.h
index 677c40244..d4a48b2b8 100644
--- a/src/include/gnunet_conversation_service.h
+++ b/src/include/gnunet_conversation_service.h
@@ -24,6 +24,10 @@
24 * @author Simon Dieterle 24 * @author Simon Dieterle
25 * @author Andreas Fuchs 25 * @author Andreas Fuchs
26 * @author Christian Grothoff 26 * @author Christian Grothoff
27 *
28 * TODO:
29 * - call waiting
30 * - put on hold
27 */ 31 */
28#ifndef GNUNET_CONVERSATION_SERVICE_H 32#ifndef GNUNET_CONVERSATION_SERVICE_H
29#define GNUNET_CONVERSATION_SERVICE_H 33#define GNUNET_CONVERSATION_SERVICE_H
@@ -232,7 +236,8 @@ GNUNET_CONVERSATION_reject (struct GNUNET_CONVERSATION_Handle *handle);
232 As this is supposed to be a "secure" service, caller ID is of 236 As this is supposed to be a "secure" service, caller ID is of
233 course provided as part of the basic implementation, as only the 237 course provided as part of the basic implementation, as only the
234 CONVERSATION service can know for sure who it is that we are 238 CONVERSATION service can know for sure who it is that we are
235 talking to.x */ 239 talking to.
240 */
236 241
237 242
238#include "gnunet_util_lib.h" 243#include "gnunet_util_lib.h"
@@ -254,6 +259,11 @@ enum GNUNET_CONVERSATION_EventCode
254 * a `const char *`. The caller ID will be a GNS name. 259 * a `const char *`. The caller ID will be a GNS name.
255 */ 260 */
256 GNUNET_CONVERSATION_EC_RING, 261 GNUNET_CONVERSATION_EC_RING,
262
263 /**
264 * The phone is busy. Varargs will be empty.
265 */
266 GNUNET_CONVERSATION_EC_BUSY,
257 267
258 /** 268 /**
259 * We are ready to talk, metadata about the call may be supplied 269 * We are ready to talk, metadata about the call may be supplied
@@ -301,11 +311,13 @@ struct GNUNET_CONVERSATION_Phone;
301 * 311 *
302 * @param cfg configuration for the phone; specifies the phone service and 312 * @param cfg configuration for the phone; specifies the phone service and
303 * which line the phone is to be connected to 313 * which line the phone is to be connected to
314 * @param ego ego to use for name resolution (when determining caller ID)
304 * @param event_handler how to notify the owner of the phone about events 315 * @param event_handler how to notify the owner of the phone about events
305 * @param event_handler_cls closure for @a event_handler 316 * @param event_handler_cls closure for @a event_handler
306 */ 317 */
307struct GNUNET_CONVERSATION_Phone * 318struct GNUNET_CONVERSATION_Phone *
308GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg, 319GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
320 const struct GNUNET_IDENTITY_Ego *ego,
309 GNUNET_CONVERSATION_EventHandler event_handler, 321 GNUNET_CONVERSATION_EventHandler event_handler,
310 void *event_handler_cls); 322 void *event_handler_cls);
311 323
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h
index f88017fbe..fd28f3de6 100644
--- a/src/include/gnunet_mq_lib.h
+++ b/src/include/gnunet_mq_lib.h
@@ -28,8 +28,6 @@
28#ifndef GNUNET_MQ_H 28#ifndef GNUNET_MQ_H
29#define GNUNET_MQ_H 29#define GNUNET_MQ_H
30 30
31#include "gnunet_common.h"
32
33 31
34/** 32/**
35 * Allocate an envelope, with extra space allocated after the space needed 33 * Allocate an envelope, with extra space allocated after the space needed
@@ -246,7 +244,6 @@ struct GNUNET_MQ_MessageHandler
246 */ 244 */
247 GNUNET_MQ_MessageCallback cb; 245 GNUNET_MQ_MessageCallback cb;
248 246
249
250 /** 247 /**
251 * Type of the message this handler covers. 248 * Type of the message this handler covers.
252 */ 249 */
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index 4b3a6fcb9..6763c05fc 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -77,6 +77,12 @@ extern "C"
77#define GNUNET_NAMESTORE_TYPE_PLACE 65541 77#define GNUNET_NAMESTORE_TYPE_PLACE 65541
78 78
79/** 79/**
80 * Record type for a phone (of CONVERSATION).
81 */
82#define GNUNET_NAMESTORE_TYPE_PHONE 65542
83
84
85/**
80 * Entry in the queue. 86 * Entry in the queue.
81 */ 87 */
82struct GNUNET_NAMESTORE_QueueEntry; 88struct GNUNET_NAMESTORE_QueueEntry;
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 60ad23097..a2b3ae60d 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2230,6 +2230,36 @@ extern "C"
2230#define GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO 751 2230#define GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO 751
2231 2231
2232 2232
2233
2234
2235
2236/**
2237 * Client -> Server message register a phone.
2238 */
2239#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER 730
2240
2241/**
2242 * Client -> Server meessage to reject/hangup a call
2243 */
2244#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP 731
2245
2246/**
2247 * Client -> Server meessage to reject/hangup a call
2248 */
2249#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP 732
2250
2251/**
2252 * Client <- Server message to indicate a ringing phone
2253 */
2254#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING 733
2255
2256/**
2257 * Client <-> Server message to send audio data.
2258 */
2259#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO 734
2260
2261
2262
2233/******************************************************************************* 2263/*******************************************************************************
2234 * MULTICAST message types 2264 * MULTICAST message types
2235 ******************************************************************************/ 2265 ******************************************************************************/