From 8718b32fb7fc43b995b520f81a911ac90562b42c Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Fri, 9 Jan 2015 23:45:52 +0200 Subject: [PATCH] core: add API to return chat ID This can be used f.ex. to return the group chat URI. --- src/api/sipe-core.h | 8 +++++++- src/core/sipe-chat.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/api/sipe-core.h b/src/api/sipe-core.h index 1e77293f..4eac2a0a 100644 --- a/src/api/sipe-core.h +++ b/src/api/sipe-core.h @@ -3,7 +3,7 @@ * * pidgin-sipe * - * Copyright (C) 2010-2014 SIPE Project + * Copyright (C) 2010-2015 SIPE Project * * 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 @@ -322,6 +322,12 @@ void sipe_core_transport_sip_connect(struct sipe_core_public *sipe_public, const gchar *sipe_core_transport_sip_server_name(struct sipe_core_public *sipe_public); /** + * Get chat ID, f.ex. group chat URI + */ +const gchar *sipe_core_chat_id(struct sipe_core_public *sipe_public, + struct sipe_chat_session *chat_session); + +/** * Invite to chat */ void sipe_core_chat_invite(struct sipe_core_public *sipe_public, diff --git a/src/core/sipe-chat.c b/src/core/sipe-chat.c index d02bc314..356cec37 100644 --- a/src/core/sipe-chat.c +++ b/src/core/sipe-chat.c @@ -3,7 +3,7 @@ * * pidgin-sipe * - * Copyright (C) 2009-2013 SIPE Project + * Copyright (C) 2009-2015 SIPE Project * * 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 @@ -93,6 +93,12 @@ void sipe_chat_destroy(void) } } +const gchar *sipe_core_chat_id(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public, + struct sipe_chat_session *chat_session) +{ + return(chat_session->id); +} + void sipe_core_chat_invite(struct sipe_core_public *sipe_public, struct sipe_chat_session *chat_session, const char *name) -- 2.11.4.GIT