diff options
Diffstat (limited to 'src/jid.c')
-rw-r--r-- | src/jid.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/jid.c b/src/jid.c index 03bf5144..ab76d5d2 100644 --- a/src/jid.c +++ b/src/jid.c @@ -125,36 +125,6 @@ jid_is_valid_room_form(Jid *jid) } /* - * Given a full room JID of the form - * room@server/nick - * Will create two new strings and point room and nick to them e.g. - * *room = "room@server", *nick = "nick" - * The strings must be freed by the caller - * Returns TRUE if the JID was parsed successfully, FALSE otherwise - */ -gboolean -parse_room_jid(const char * const full_room_jid, char **room, char **nick) -{ - Jid *jid = jid_create(full_room_jid); - - if (jid == NULL) { - return FALSE; - } - - if (jid->resourcepart == NULL) { - jid_destroy(jid); - return FALSE; - } - - *room = strdup(jid->barejid); - *nick = strdup(jid->resourcepart); - - jid_destroy(jid); - - return TRUE; -} - -/* * Given a barejid, and resourcepart, create and return a full JID of the form * barejid/resourcepart * Will return a newly created string that must be freed by the caller @@ -174,28 +144,6 @@ create_fulljid(const char * const barejid, const char * const resource) } /* - * Get the room name part of the full JID, e.g. - * Full JID = "test@conference.server/person" - * returns "test@conference.server" - */ -char * -get_room_from_full_jid(const char * const full_room_jid) -{ - char **tokens = g_strsplit(full_room_jid, "/", 0); - char *room_part = NULL; - - if (tokens != NULL) { - if (tokens[0] != NULL) { - room_part = strdup(tokens[0]); - } - - g_strfreev(tokens); - } - - return room_part; -} - -/* * Get the nickname part of the full JID, e.g. * Full JID = "test@conference.server/person" * returns "person" |