From: <rl...@us...> - 2006-09-09 21:33:10
|
Revision: 17210 http://svn.sourceforge.net/gaim/?rev=17210&view=rev Author: rlaager Date: 2006-09-09 14:32:47 -0700 (Sat, 09 Sep 2006) Log Message: ----------- SF Patch #1554418 from TiCPU Adds gaim_buddy_get_server_alias(). Modified Paths: -------------- trunk/doc/ChangeLog.API trunk/libgaim/blist.c trunk/libgaim/blist.h Modified: trunk/doc/ChangeLog.API =================================================================== --- trunk/doc/ChangeLog.API 2006-09-09 21:32:30 UTC (rev 17209) +++ trunk/doc/ChangeLog.API 2006-09-09 21:32:47 UTC (rev 17210) @@ -320,6 +320,7 @@ * gaim_util_fetch_url_cancel(): Can be used to cancel a pending call to gaim_util_fetch_url() or gaim_util_fetch_url_request(). * GaimGtkWindow: dialogs.search (previously in GaimGtkConversation) + * gaim_buddy_get_server_alias() Signals - Changed: (See the Doxygen docs for details on all signals.) * Signal propagation now stops after a handler returns a non-NULL value. Modified: trunk/libgaim/blist.c =================================================================== --- trunk/libgaim/blist.c 2006-09-09 21:32:30 UTC (rev 17209) +++ trunk/libgaim/blist.c 2006-09-09 21:32:47 UTC (rev 17210) @@ -2014,6 +2014,16 @@ return buddy->name; } +const char *gaim_buddy_get_server_alias(GaimBuddy *buddy) +{ + g_return_val_if_fail(buddy != NULL, NULL); + + if ((buddy->server_alias) && (*buddy->server_alias)) + return buddy->server_alias; + + return NULL; +} + const char *gaim_buddy_get_local_alias(GaimBuddy *buddy) { GaimContact *c; Modified: trunk/libgaim/blist.h =================================================================== --- trunk/libgaim/blist.h 2006-09-09 21:32:30 UTC (rev 17209) +++ trunk/libgaim/blist.h 2006-09-09 21:32:47 UTC (rev 17210) @@ -545,6 +545,13 @@ */ const char *gaim_buddy_get_alias_only(GaimBuddy *buddy); +/** + * Gets the server alias for a buddy. + * + * @param buddy The buddy whose name will be returned + * @return The server alias, or NULL if it is not set. + */ +const char *gaim_buddy_get_server_alias(GaimBuddy *buddy); /** * Returns the correct name to display for a buddy, taking the contact alias This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |