Mercurial > pidgin
comparison src/protocols/oscar/ssi.c @ 3466:7a3f16a375a5
[gaim-migrate @ 3516]
some patches from some people.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 29 Aug 2002 01:47:15 +0000 |
parents | dd34e0b40fed |
children | 1e60a05c7482 |
comparison
equal
deleted
inserted
replaced
3465:ec437d73b2ee | 3466:7a3f16a375a5 |
---|---|
34 * @param name A null terminated string of the name of the new item, or NULL if the | 34 * @param name A null terminated string of the name of the new item, or NULL if the |
35 * item should have no name. | 35 * item should have no name. |
36 * @param type The type of the item, 0x0001 for a contact, 0x0002 for a group, etc. | 36 * @param type The type of the item, 0x0001 for a contact, 0x0002 for a group, etc. |
37 * @return The newly created item. | 37 * @return The newly created item. |
38 */ | 38 */ |
39 static struct aim_ssi_item *aim_ssi_itemlist_add(struct aim_ssi_item **list, struct aim_ssi_item *parent, char *name, fu16_t type) | 39 static struct aim_ssi_item *aim_ssi_itemlist_add(struct aim_ssi_item **list, struct aim_ssi_item *parent, const char *name, fu16_t type) |
40 { | 40 { |
41 int i; | 41 int i; |
42 struct aim_ssi_item *cur, *newitem; | 42 struct aim_ssi_item *cur, *newitem; |
43 | 43 |
44 if (!(newitem = (struct aim_ssi_item *)malloc(sizeof(struct aim_ssi_item)))) | 44 if (!(newitem = (struct aim_ssi_item *)malloc(sizeof(struct aim_ssi_item)))) |
190 * @param gn The group name of the desired item. | 190 * @param gn The group name of the desired item. |
191 * @param bn The buddy name of the desired item. | 191 * @param bn The buddy name of the desired item. |
192 * @param type The type of the desired item. | 192 * @param type The type of the desired item. |
193 * @return Return a pointer to the item if found, else return NULL; | 193 * @return Return a pointer to the item if found, else return NULL; |
194 */ | 194 */ |
195 faim_export struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, char *gn, char *sn, fu16_t type) | 195 faim_export struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, const char *gn, const char *sn, fu16_t type) |
196 { | 196 { |
197 struct aim_ssi_item *cur; | 197 struct aim_ssi_item *cur; |
198 if (!list) | 198 if (!list) |
199 return NULL; | 199 return NULL; |
200 | 200 |
488 * @param gn The name of the group to which you want to add these names. | 488 * @param gn The name of the group to which you want to add these names. |
489 * @param sn An array of null terminated strings of the names you want to add. | 489 * @param sn An array of null terminated strings of the names you want to add. |
490 * @param num The number of screen names you are adding (size of the sn array). | 490 * @param num The number of screen names you are adding (size of the sn array). |
491 * @return Return 0 if no errors, otherwise return the error number. | 491 * @return Return 0 if no errors, otherwise return the error number. |
492 */ | 492 */ |
493 faim_export int aim_ssi_addbuddies(aim_session_t *sess, aim_conn_t *conn, char *gn, char **sn, unsigned int num) | 493 faim_export int aim_ssi_addbuddies(aim_session_t *sess, aim_conn_t *conn, const char *gn, const char **sn, unsigned int num) |
494 { | 494 { |
495 struct aim_ssi_item *parentgroup, **newitems; | 495 struct aim_ssi_item *parentgroup, **newitems; |
496 fu16_t i; | 496 fu16_t i; |
497 | 497 |
498 if (!sess || !conn || !gn || !sn || !num) | 498 if (!sess || !conn || !gn || !sn || !num) |
642 * @param num The number of groups names you are adding (size of the sn array). | 642 * @param num The number of groups names you are adding (size of the sn array). |
643 * @param type The type of item you want to add. See the AIM_SSI_TYPE_BLEH | 643 * @param type The type of item you want to add. See the AIM_SSI_TYPE_BLEH |
644 * #defines in aim.h. | 644 * #defines in aim.h. |
645 * @return Return 0 if no errors, otherwise return the error number. | 645 * @return Return 0 if no errors, otherwise return the error number. |
646 */ | 646 */ |
647 faim_export int aim_ssi_addpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, fu16_t type) | 647 faim_export int aim_ssi_addpord(aim_session_t *sess, aim_conn_t *conn, const char **sn, unsigned int num, fu16_t type) |
648 { | 648 { |
649 struct aim_ssi_item **newitems; | 649 struct aim_ssi_item **newitems; |
650 fu16_t i; | 650 fu16_t i; |
651 | 651 |
652 if (!sess || !conn || !sn || !num) | 652 if (!sess || !conn || !sn || !num) |
990 * @param conn The bos connection for this session. | 990 * @param conn The bos connection for this session. |
991 * @param sn An array of null terminated strings of the items you want to delete. | 991 * @param sn An array of null terminated strings of the items you want to delete. |
992 * @param num The number of items you are deleting (size of the sn array). | 992 * @param num The number of items you are deleting (size of the sn array). |
993 * @return Return 0 if no errors, otherwise return the error number. | 993 * @return Return 0 if no errors, otherwise return the error number. |
994 */ | 994 */ |
995 faim_export int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, fu16_t type) { | 995 faim_export int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, const char **sn, unsigned int num, fu16_t type) { |
996 struct aim_ssi_item *cur, **delitems; | 996 struct aim_ssi_item *cur, **delitems; |
997 int i; | 997 int i; |
998 | 998 |
999 if (!sess || !conn || !sn || !num || (type!=AIM_SSI_TYPE_PERMIT && type!=AIM_SSI_TYPE_DENY)) | 999 if (!sess || !conn || !sn || !num || (type!=AIM_SSI_TYPE_PERMIT && type!=AIM_SSI_TYPE_DENY)) |
1000 return -EINVAL; | 1000 return -EINVAL; |