[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29818 - in gnunet/src: conversation include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29818 - in gnunet/src: conversation include |
Date: |
Thu, 3 Oct 2013 15:50:36 +0200 |
Author: grothoff
Date: 2013-10-03 15:50:35 +0200 (Thu, 03 Oct 2013)
New Revision: 29818
Modified:
gnunet/src/conversation/Makefile.am
gnunet/src/conversation/conversation.h
gnunet/src/conversation/conversation_api2.c
gnunet/src/include/gnunet_client_lib.h
gnunet/src/include/gnunet_conversation_service.h
gnunet/src/include/gnunet_mq_lib.h
gnunet/src/include/gnunet_namestore_service.h
gnunet/src/include/gnunet_protocols.h
Log:
-finishing first round of conversation phone API implementation
Modified: gnunet/src/conversation/Makefile.am
===================================================================
--- gnunet/src/conversation/Makefile.am 2013-10-03 12:00:41 UTC (rev 29817)
+++ gnunet/src/conversation/Makefile.am 2013-10-03 13:50:35 UTC (rev 29818)
@@ -48,6 +48,7 @@
libgnunetspeaker.la \
$(top_builddir)/src/gns/libgnunetgns.la \
$(top_builddir)/src/namestore/libgnunetnamestore.la \
+ $(top_builddir)/src/identity/libgnunetidentity.la \
$(top_builddir)/src/util/libgnunetutil.la
libgnunetconversation_la_LDFLAGS = \
Modified: gnunet/src/conversation/conversation.h
===================================================================
--- gnunet/src/conversation/conversation.h 2013-10-03 12:00:41 UTC (rev
29817)
+++ gnunet/src/conversation/conversation.h 2013-10-03 13:50:35 UTC (rev
29818)
@@ -444,6 +444,19 @@
/**
+ * Service -> Client message for phone is busy.
+ */
+struct ClientPhoneBusyMessage
+{
+ /**
+ * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_BUSY
+ */
+ struct GNUNET_MessageHeader header;
+
+};
+
+
+/**
* Client -> Service pick up phone that is ringing.
*/
struct ClientPhonePickupMessage
@@ -459,7 +472,7 @@
/**
- * Client -> Service hang up phone that may or may not be ringing.
+ * Client <-> Service hang up phone that may or may not be ringing.
* Also sent in response to a (failed) `struct ClientCallMessage`.
*/
struct ClientPhoneHangupMessage
@@ -609,6 +622,20 @@
/**
+ * Mesh message for phone busy.
+ */
+struct MeshPhoneBusyMessage
+{
+ /**
+ * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_BUSY
+ */
+ struct GNUNET_MessageHeader header;
+
+ /* followed by variable-size 0-terminated metadata string??? */
+};
+
+
+/**
* Mesh message to transmit the audio.
*/
struct MeshAudioMessage
Modified: gnunet/src/conversation/conversation_api2.c
===================================================================
--- gnunet/src/conversation/conversation_api2.c 2013-10-03 12:00:41 UTC (rev
29817)
+++ gnunet/src/conversation/conversation_api2.c 2013-10-03 13:50:35 UTC (rev
29818)
@@ -27,6 +27,8 @@
*/
#include "platform.h"
#include "gnunet_conversation_service.h"
+#include "gnunet_gns_service.h"
+#include "conversation.h"
/**
@@ -52,12 +54,38 @@
/**
* Identity of the peer hosting the phone service.
*/
- struct GNUNET_PeerIdentity my_peer;
+ struct GNUNET_PeerIdentity peer;
};
+/**
+ * Possible states of the phone.
+ */
+enum PhoneState
+{
+ /**
+ * We still need to register the phone.
+ */
+ PS_REGISTER = 0,
+ /**
+ * We are waiting for a call.
+ */
+ PS_WAITING,
+
+ /**
+ * The phone is ringing.
+ */
+ PS_RINGING,
+
+ /**
+ * The phone is in an active conversation.
+ */
+ PS_ACTIVE
+};
+
+
/**
* A phone is a device that can ring to signal an incoming call and
* that you can pick up to answer the call and hang up to terminate
@@ -75,6 +103,11 @@
* Our configuration.
*/
const struct GNUNET_CONFIGURATION_Handle *cfg;
+
+ /**
+ * Handle to talk with CONVERSATION service.
+ */
+ struct GNUNET_CLIENT_Connection *client;
/**
* Function to call for phone events.
@@ -89,35 +122,340 @@
/**
* Speaker, or NULL if none is attached.
*/
- struct GNUNET_CONVERSATION_Speaker *speaker;
+ struct GNUNET_SPEAKER_Handle *speaker;
/**
* Microphone, or NULL if none is attached.
*/
- struct GNUNET_CONVERSATION_Microphone *mic;
+ struct GNUNET_MICROPHONE_Handle *mic;
/**
+ * Connection to NAMESTORE (for reverse lookup).
+ */
+ struct GNUNET_NAMESTORE_Handle *ns;
+
+ /**
+ * Active NAMESTORE lookup (or NULL).
+ */
+ struct GNUNET_NAMESTORE_QueueEntry *qe;
+
+ /**
+ * Handle for transmitting to the CONVERSATION service.
+ */
+ struct GNUNET_MQ_Handle *mq;
+
+ /**
* This phone's record.
*/
- struct PhoneRecord my_record;
+ struct PhoneRecord my_record;
+ /**
+ * My GNS zone.
+ */
+ struct GNUNET_CRYPTO_EccPrivateKey my_zone;
+
+ /**
+ * Identity of the person calling us (valid while in state #PS_RINGING).
+ */
+ struct GNUNET_CRYPTO_EccPublicSignKey caller_id;
+
+ /**
+ * State machine for the phone.
+ */
+ enum PhoneState state;
+
};
/**
+ * The phone got disconnected, reconnect to the service.
+ *
+ * @param phone phone to reconnect
+ */
+static void
+reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone);
+
+
+/**
+ * We have resolved the caller ID using our name service.
+ *
+ * @param cls the `struct GNUNET_CONVERSATION_Phone`
+ * @param zone our zone used for resolution
+ * @param label name of the caller
+ * @param rd_count number of records we have in @a rd
+ * @param rd records we have for the caller's label
+ */
+static void
+handle_caller_name (void *cls,
+ const struct GNUNET_CRYPTO_EccPrivateKey *zone,
+ const char *label,
+ unsigned int rd_count,
+ const struct GNUNET_NAMESTORE_RecordData *rd)
+{
+ struct GNUNET_CONVERSATION_Phone *phone = cls;
+ char *name;
+
+ phone->qe = NULL;
+ if (NULL == label)
+ name = GNUNET_strdup (GNUNET_NAMESTORE_pkey_to_zkey (&phone->caller_id));
+ else
+ GNUNET_asprintf (&name, "%.gnu", label);
+ phone->event_handler (phone->event_handler_cls,
+ GNUNET_CONVERSATION_EC_RING,
+ name);
+ GNUNET_free (name);
+}
+
+
+/**
+ * We received a `struct ClientPhoneRingMessage`
+ *
+ * @param cls the `struct GNUNET_CONVERSATION_Phone`
+ * @param msg the message
+ */
+static void
+handle_phone_ring (void *cls,
+ const struct GNUNET_MessageHeader *msg)
+{
+ struct GNUNET_CONVERSATION_Phone *phone = cls;
+ const struct ClientPhoneRingMessage *ring;
+
+ ring = (const struct ClientPhoneRingMessage *) msg;
+ switch (phone->state)
+ {
+ case PS_REGISTER:
+ GNUNET_assert (0);
+ break;
+ case PS_WAITING:
+ phone->state = PS_RINGING;
+ phone->caller_id = ring->caller_id;
+ phone->qe = GNUNET_NAMESTORE_zone_to_name (phone->ns,
+ &phone->my_zone,
+ &ring->caller_id,
+ &handle_caller_name,
+ phone);
+ break;
+ case PS_RINGING:
+ GNUNET_break (0);
+ reconnect_phone (phone);
+ break;
+ case PS_ACTIVE:
+ GNUNET_break (0);
+ reconnect_phone (phone);
+ break;
+ }
+}
+
+
+/**
+ * We received a `struct ClientPhoneHangupMessage`.
+ *
+ * @param cls the `struct GNUNET_CONVERSATION_Phone`
+ * @param msg the message
+ */
+static void
+handle_phone_hangup (void *cls,
+ const struct GNUNET_MessageHeader *msg)
+{
+ struct GNUNET_CONVERSATION_Phone *phone = cls;
+ const struct ClientPhoneHangupMessage *hang;
+ size_t len;
+ const char *reason;
+
+ hang = (const struct ClientPhoneHangupMessage *) msg;
+ reason = (const char *) &hang[1];
+ len = htons (hang->header.size) - sizeof (struct ClientPhoneHangupMessage);
+ if ( (0 == len) ||
+ ('\0' != reason[len-1]) )
+ {
+ GNUNET_break (0);
+ reconnect_phone (phone);
+ return;
+ }
+ switch (phone->state)
+ {
+ case PS_REGISTER:
+ GNUNET_assert (0);
+ break;
+ case PS_WAITING:
+ GNUNET_break (0);
+ reconnect_phone (phone);
+ break;
+ case PS_RINGING:
+ if (NULL != phone->qe)
+ {
+ GNUNET_NAMESTORE_cancel (phone->qe);
+ phone->qe = NULL;
+ phone->state = PS_WAITING;
+ break;
+ }
+ phone->state = PS_WAITING;
+ phone->event_handler (phone->event_handler_cls,
+ GNUNET_CONVERSATION_EC_TERMINATED,
+ reason);
+ break;
+ case PS_ACTIVE:
+ GNUNET_break (NULL == phone->qe);
+ phone->state = PS_WAITING;
+ phone->event_handler (phone->event_handler_cls,
+ GNUNET_CONVERSATION_EC_TERMINATED,
+ reason);
+ break;
+ }
+}
+
+
+/**
+ * We received a `struct ClientAudioMessage`
+ *
+ * @param cls the `struct GNUNET_CONVERSATION_Phone`
+ * @param msg the message
+ */
+static void
+handle_audio_message (void *cls,
+ const struct GNUNET_MessageHeader *msg)
+{
+ struct GNUNET_CONVERSATION_Phone *phone = cls;
+ const struct ClientAudioMessage *am;
+
+ am = (const struct ClientAudioMessage *) msg;
+ switch (phone->state)
+ {
+ case PS_REGISTER:
+ GNUNET_assert (0);
+ break;
+ case PS_WAITING:
+ GNUNET_break (0);
+ reconnect_phone (phone);
+ break;
+ case PS_RINGING:
+ GNUNET_break (0);
+ reconnect_phone (phone);
+ break;
+ case PS_ACTIVE:
+ phone->speaker->play (phone->speaker->cls,
+ ntohs (msg->size) - sizeof (struct
ClientAudioMessage),
+ &am[1]);
+ break;
+ }
+}
+
+
+/**
+ * We encountered an error talking with the conversation service.
+ *
+ * @param cls the `struct GNUNET_CONVERSATION_Phone`
+ * @param error details about the error
+ */
+static void
+error_handler (void *cls,
+ enum GNUNET_MQ_Error error)
+{
+ struct GNUNET_CONVERSATION_Phone *phone = cls;
+
+ GNUNET_break (0);
+ reconnect_phone (phone);
+}
+
+
+/**
+ * The phone got disconnected, reconnect to the service.
+ *
+ * @param phone phone to reconnect
+ */
+static void
+reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone)
+{
+ static struct GNUNET_MQ_MessageHandler handlers[] =
+ {
+ { &handle_phone_ring,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
+ sizeof (struct ClientPhoneRingMessage) },
+ { &handle_phone_hangup,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
+ 0 },
+ { &handle_audio_message,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
+ 0 },
+ { NULL, 0, 0 }
+ };
+ struct GNUNET_MQ_Envelope *e;
+ struct ClientPhoneRegisterMessage *reg;
+
+ if (NULL != phone->mq)
+ {
+ GNUNET_MQ_destroy (phone->mq);
+ phone->mq = NULL;
+ }
+ if (NULL != phone->client)
+ {
+ GNUNET_CLIENT_disconnect (phone->client);
+ phone->client = NULL;
+ }
+ phone->state = PS_REGISTER;
+ phone->client = GNUNET_CLIENT_connect ("conversation", phone->cfg);
+ if (NULL == phone->client)
+ return;
+ phone->mq = GNUNET_MQ_queue_for_connection_client (phone->client,
+ handlers,
+ &error_handler,
+ phone);
+ e = GNUNET_MQ_msg (reg, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER);
+ reg->line = phone->my_record.line;
+ GNUNET_MQ_send (phone->mq, e);
+ phone->state = PS_WAITING;
+}
+
+
+/**
* Create a new phone.
*
* @param cfg configuration for the phone; specifies the phone service and
* which line the phone is to be connected to
+ * @param ego ego to use for name resolution (when determining caller ID)
* @param event_handler how to notify the owner of the phone about events
* @param event_handler_cls closure for @a event_handler
*/
struct GNUNET_CONVERSATION_Phone *
GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle
*cfg,
- GNUNET_CONVERSATION_EventHandler
event_handler,
+ const struct GNUNET_IDENTITY_Ego *ego,
+ GNUNET_CONVERSATION_EventHandler
event_handler,
void *event_handler_cls)
{
- return NULL;
+ struct GNUNET_CONVERSATION_Phone *phone;
+ unsigned long long line;
+
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (cfg,
+ "CONVERSATION",
+ "LINE",
+ &line))
+ return NULL;
+ phone = GNUNET_new (struct GNUNET_CONVERSATION_Phone);
+ if (GNUNET_OK !=
+ GNUNET_CRYPTO_get_host_identity (cfg,
+ &phone->my_record.peer))
+ {
+ GNUNET_break (0);
+ GNUNET_free (phone);
+ return NULL;
+ }
+ phone->cfg = cfg;
+ phone->my_zone = *GNUNET_IDENTITY_ego_get_private_key (ego);
+ phone->event_handler = event_handler;
+ phone->event_handler_cls = event_handler_cls;
+ phone->ns = GNUNET_NAMESTORE_connect (cfg);
+ phone->my_record.line = htonl ((uint32_t) line);
+ phone->my_record.version = htonl (0);
+ reconnect_phone (phone);
+ if ( (NULL == phone->client) ||
+ (NULL == phone->ns) )
+ {
+ GNUNET_break (0);
+ GNUNET_CONVERSATION_phone_destroy (phone);
+ return NULL;
+ }
+ return phone;
}
@@ -133,11 +471,37 @@
GNUNET_CONVERSATION_phone_get_record (struct GNUNET_CONVERSATION_Phone *phone,
struct GNUNET_NAMESTORE_RecordData *rd)
{
- GNUNET_assert (0);
+ rd->data = &phone->my_record;
+ rd->expiration_time = 0;
+ rd->data_size = sizeof (struct PhoneRecord);
+ rd->record_type = GNUNET_NAMESTORE_TYPE_PHONE;
+ rd->flags = GNUNET_NAMESTORE_RF_NONE;
}
/**
+ * Process recorded audio data.
+ *
+ * @param cls closure with the `struct GNUNET_CONVERSATION_Phone`
+ * @param data_size number of bytes in @a data
+ * @param data audio data to play
+ */
+static void
+transmit_audio (void *cls,
+ size_t data_size,
+ const void *data)
+{
+ struct GNUNET_CONVERSATION_Phone *phone = cls;
+ struct GNUNET_MQ_Envelope *e;
+ struct ClientAudioMessage *am;
+
+ GNUNET_assert (PS_ACTIVE == phone->state);
+ e = GNUNET_MQ_msg_extra (am, data_size,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO);
+ GNUNET_MQ_send (phone->mq, e);
+}
+
+
+/**
* Picks up a (ringing) phone. This will connect the speaker
* to the microphone of the other party, and vice versa.
*
@@ -152,7 +516,22 @@
struct GNUNET_SPEAKER_Handle *speaker,
struct GNUNET_MICROPHONE_Handle *mic)
{
- GNUNET_assert (0);
+ struct GNUNET_MQ_Envelope *e;
+ struct ClientPhonePickupMessage *pick;
+ size_t slen;
+
+ GNUNET_assert (PS_RINGING == phone->state);
+ phone->speaker = speaker;
+ phone->mic = mic;
+ slen = strlen (metadata) + 1;
+ e = GNUNET_MQ_msg_extra (pick, slen,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP);
+ memcpy (&pick[1], metadata, slen);
+ GNUNET_MQ_send (phone->mq, e);
+ phone->state = PS_ACTIVE;
+ phone->speaker->enable_speaker (phone->speaker->cls);
+ phone->mic->enable_microphone (phone->mic->cls,
+ &transmit_audio,
+ phone);
}
@@ -167,7 +546,21 @@
GNUNET_CONVERSTATION_phone_hang_up (struct GNUNET_CONVERSATION_Phone *phone,
const char *reason)
{
- GNUNET_assert (0);
+ struct GNUNET_MQ_Envelope *e;
+ struct ClientPhoneHangupMessage *hang;
+ size_t slen;
+
+ GNUNET_assert ( (PS_RINGING == phone->state) ||
+ (PS_ACTIVE == phone->state) );
+ phone->speaker->disable_speaker (phone->speaker->cls);
+ phone->mic->disable_microphone (phone->mic->cls);
+ phone->speaker = NULL;
+ phone->mic = NULL;
+ slen = strlen (reason) + 1;
+ e = GNUNET_MQ_msg_extra (hang, slen,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP);
+ memcpy (&hang[1], reason, slen);
+ GNUNET_MQ_send (phone->mq, e);
+ phone->state = PS_WAITING;
}
@@ -179,30 +572,104 @@
void
GNUNET_CONVERSATION_phone_destroy (struct GNUNET_CONVERSATION_Phone *phone)
{
- GNUNET_assert (0);
+ if (NULL != phone->speaker)
+ {
+ phone->speaker->disable_speaker (phone->speaker->cls);
+ phone->speaker = NULL;
+ }
+ if (NULL != phone->mic)
+ {
+ phone->mic->disable_microphone (phone->mic->cls);
+ phone->mic = NULL;
+ }
+ if (NULL != phone->qe)
+ {
+ GNUNET_NAMESTORE_cancel (phone->qe);
+ phone->qe = NULL;
+ }
+ if (NULL != phone->ns)
+ {
+ GNUNET_NAMESTORE_disconnect (phone->ns);
+ phone->ns = NULL;
+ }
+ if (NULL != phone->mq)
+ {
+ GNUNET_MQ_destroy (phone->mq);
+ phone->mq = NULL;
+ }
+ if (NULL != phone->client)
+ {
+ GNUNET_CLIENT_disconnect (phone->client);
+ phone->client = NULL;
+ }
+ GNUNET_free (phone);
}
+/* ******************************* Call API *************************** */
+
+
/**
* Handle for an outgoing call.
*/
struct GNUNET_CONVERSATION_Call
{
+ /**
+ * Our configuration.
+ */
const struct GNUNET_CONFIGURATION_Handle *cfg;
+ /**
+ * Handle to talk with CONVERSATION service.
+ */
+ struct GNUNET_CLIENT_Handle *client;
+
+ /**
+ * Our caller identity.
+ */
struct GNUNET_IDENTITY_Ego *caller_id;
+ /**
+ * Target callee as a GNS address/name.
+ */
char *callee;
+ /**
+ * Our speaker.
+ */
struct GNUNET_CONVERSATION_Speaker *speaker;
+ /**
+ * Our microphone.
+ */
struct GNUNET_CONVERSATION_Microphone *mic;
+ /**
+ * Function to call with events.
+ */
GNUNET_CONVERSATION_EventHandler event_handler;
+ /**
+ * Closure for @e event_handler
+ */
void *event_handler_cls;
+ /**
+ * Connection to GNS (can be NULL).
+ */
+ struct GNUNET_GNS_Handle *gns;
+
+ /**
+ * Active GNS lookup (or NULL).
+ */
+ struct GNUNET_GNS_LookupRequest *gns_lookup;
+
+ /**
+ * Target phone record, only valid after the lookup is done.
+ */
+ struct PhoneRecord phone_record;
+
};
Modified: gnunet/src/include/gnunet_client_lib.h
===================================================================
--- gnunet/src/include/gnunet_client_lib.h 2013-10-03 12:00:41 UTC (rev
29817)
+++ gnunet/src/include/gnunet_client_lib.h 2013-10-03 13:50:35 UTC (rev
29818)
@@ -80,8 +80,7 @@
* @param msg message received, NULL on timeout or fatal error
*/
typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls,
- const struct GNUNET_MessageHeader
- *msg);
+ const struct
GNUNET_MessageHeader *msg);
/**
@@ -129,8 +128,8 @@
size_t size,
struct GNUNET_TIME_Relative timeout,
int auto_retry,
- GNUNET_CONNECTION_TransmitReadyNotify
- notify, void *notify_cls);
+ GNUNET_CONNECTION_TransmitReadyNotify
notify,
+ void *notify_cls);
/**
Modified: gnunet/src/include/gnunet_conversation_service.h
===================================================================
--- gnunet/src/include/gnunet_conversation_service.h 2013-10-03 12:00:41 UTC
(rev 29817)
+++ gnunet/src/include/gnunet_conversation_service.h 2013-10-03 13:50:35 UTC
(rev 29818)
@@ -24,6 +24,10 @@
* @author Simon Dieterle
* @author Andreas Fuchs
* @author Christian Grothoff
+ *
+ * TODO:
+ * - call waiting
+ * - put on hold
*/
#ifndef GNUNET_CONVERSATION_SERVICE_H
#define GNUNET_CONVERSATION_SERVICE_H
@@ -232,7 +236,8 @@
As this is supposed to be a "secure" service, caller ID is of
course provided as part of the basic implementation, as only the
CONVERSATION service can know for sure who it is that we are
- talking to.x */
+ talking to.
+ */
#include "gnunet_util_lib.h"
@@ -254,6 +259,11 @@
* a `const char *`. The caller ID will be a GNS name.
*/
GNUNET_CONVERSATION_EC_RING,
+
+ /**
+ * The phone is busy. Varargs will be empty.
+ */
+ GNUNET_CONVERSATION_EC_BUSY,
/**
* We are ready to talk, metadata about the call may be supplied
@@ -301,11 +311,13 @@
*
* @param cfg configuration for the phone; specifies the phone service and
* which line the phone is to be connected to
+ * @param ego ego to use for name resolution (when determining caller ID)
* @param event_handler how to notify the owner of the phone about events
* @param event_handler_cls closure for @a event_handler
*/
struct GNUNET_CONVERSATION_Phone *
GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle
*cfg,
+ const struct GNUNET_IDENTITY_Ego *ego,
GNUNET_CONVERSATION_EventHandler
event_handler,
void *event_handler_cls);
Modified: gnunet/src/include/gnunet_mq_lib.h
===================================================================
--- gnunet/src/include/gnunet_mq_lib.h 2013-10-03 12:00:41 UTC (rev 29817)
+++ gnunet/src/include/gnunet_mq_lib.h 2013-10-03 13:50:35 UTC (rev 29818)
@@ -28,9 +28,7 @@
#ifndef GNUNET_MQ_H
#define GNUNET_MQ_H
-#include "gnunet_common.h"
-
/**
* Allocate an envelope, with extra space allocated after the space needed
* by the message struct.
@@ -246,7 +244,6 @@
*/
GNUNET_MQ_MessageCallback cb;
-
/**
* Type of the message this handler covers.
*/
Modified: gnunet/src/include/gnunet_namestore_service.h
===================================================================
--- gnunet/src/include/gnunet_namestore_service.h 2013-10-03 12:00:41 UTC
(rev 29817)
+++ gnunet/src/include/gnunet_namestore_service.h 2013-10-03 13:50:35 UTC
(rev 29818)
@@ -77,6 +77,12 @@
#define GNUNET_NAMESTORE_TYPE_PLACE 65541
/**
+ * Record type for a phone (of CONVERSATION).
+ */
+#define GNUNET_NAMESTORE_TYPE_PHONE 65542
+
+
+/**
* Entry in the queue.
*/
struct GNUNET_NAMESTORE_QueueEntry;
Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h 2013-10-03 12:00:41 UTC (rev
29817)
+++ gnunet/src/include/gnunet_protocols.h 2013-10-03 13:50:35 UTC (rev
29818)
@@ -2230,6 +2230,36 @@
#define GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO 751
+
+
+
+/**
+ * Client -> Server message register a phone.
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER 730
+
+/**
+ * Client -> Server meessage to reject/hangup a call
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP 731
+
+/**
+ * Client -> Server meessage to reject/hangup a call
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP 732
+
+/**
+ * Client <- Server message to indicate a ringing phone
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING 733
+
+/**
+ * Client <-> Server message to send audio data.
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO 734
+
+
+
/*******************************************************************************
* MULTICAST message types
******************************************************************************/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29818 - in gnunet/src: conversation include,
gnunet <=