]> sjero.net Git - linphone/blobdiff - coreapi/help/doxygen.dox
add messaging documentation
[linphone] / coreapi / help / doxygen.dox
index 1ef0e97d1f894c8f9dd72325975d0bcbb069da2a..8707785b21a8e9481a36ad02891335ffcb787e5c 100644 (file)
@@ -146,8 +146,29 @@ linphone_friend_done(my_friend); /*commit changes triggering an UNSUBSCRIBE mess
 <br> A complete tutorial can be found at : \ref buddy_tutorials "Registration tutorial" 
 
 
-*/
+**/
+
+/**
+* @defgroup chatroom Chat room and Messaging 
+<b> Exchanging text messages</b>
+<br> Messages are sent using #LinphoneChatRoom object. First step is to create a \link linphone_core_create_chat_room() chat room \endlink
+from a peer sip uri.
+\code
+LinphoneChatRoom* chat_room = linphone_core_create_chat_room(lc,"sip:joe@sip.linphone.org");
+\endcode
 
+<br>Once created, messages are sent using function linphone_chat_room_send_message()  . 
+\code
+linphone_chat_room_send_message(chat_room,"Hello world"); /*sending message*/
+\endcode
+<br>Incoming message are received from call back LinphoneCoreVTable.text_received
+\code
+void text_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message) {
+       printf(" Message [%s] received from [%s] \n",message,linphone_address_as_string (from));
+}
+\endcode
+<br> A complete tutorial can be found at : \ref chatroom_tuto "Chat room tutorial" 
+**/
 
 /**
  * @defgroup call_logs Managing call logs