From: Christian H. <ch...@us...> - 2003-09-07 23:54:00
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory sc8-pr-cvs1:/tmp/cvs-serv17552 Modified Files: user.c user.h Log Message: MsnUser can now store a MsnObject. Index: user.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/user.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- user.c 2 Sep 2003 04:32:16 -0000 1.6 +++ user.c 7 Sep 2003 23:53:52 -0000 1.7 @@ -187,6 +187,28 @@ msn_user_set_mobile_phone(MsnUser *user, user->phone.mobile = (number == NULL ? NULL : g_strdup(number)); } +void +msn_user_set_object(MsnUser *user, MsnObject *obj) +{ + g_return_if_fail(user != NULL); + + if (user->msnobj != NULL) + msn_object_destroy(user->msnobj); + + user->msnobj = obj; +} + +void +msn_user_set_client_caps(MsnUser *user, GHashTable *info) +{ + g_return_if_fail(user != NULL); + g_return_if_fail(info != NULL); + + if (user->clientcaps != NULL) + g_hash_table_destroy(user->clientcaps); + + user->clientcaps = info; +} const char * msn_user_get_passport(const MsnUser *user) @@ -236,16 +258,12 @@ msn_user_get_mobile_phone(const MsnUser return user->phone.mobile; } -void -msn_user_set_client_caps(MsnUser *user, GHashTable *info) +MsnObject * +msn_user_get_object(const MsnUser *user) { - g_return_if_fail(user != NULL); - g_return_if_fail(info != NULL); - - if (user->clientcaps != NULL) - g_hash_table_destroy(user->clientcaps); + g_return_val_if_fail(user != NULL, NULL); - user->clientcaps = info; + return user->msnobj; } GHashTable * Index: user.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/user.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -p -r1.9 -r1.10 --- user.h 7 Sep 2003 23:46:59 -0000 1.9 +++ user.h 7 Sep 2003 23:53:52 -0000 1.10 @@ -176,6 +176,23 @@ void msn_user_set_work_phone(MsnUser *us void msn_user_set_mobile_phone(MsnUser *user, const char *number); /** + * Sets the MSNObject for a user. + * + * @param user The user. + * @param obj The MSNObject. + */ +void msn_user_set_object(MsnUser *user, MsnObject *obj); + +/** + * Sets the client information for a user. + * + * @param user The user. + * @param info The client information. + */ +void msn_user_set_client_caps(MsnUser *user, GHashTable *info); + + +/** * Returns the passport account for a user. * * @param user The user. @@ -230,12 +247,13 @@ const char *msn_user_get_work_phone(cons const char *msn_user_get_mobile_phone(const MsnUser *user); /** - * Sets the client information for a user. + * Returns the MSNObject for a user. * * @param user The user. - * @param info The client information. + * + * @return The MSNObject. */ -void msn_user_set_client_caps(MsnUser *user, GHashTable *info); +MsnObject *msn_user_get_object(const MsnUser *user); /** * Returns the client information for a user. |