Sun, 15 Apr 2007 02:10:37 +0000
propagate from branch 'im.pidgin.gaim' (head b2836a24d81e7a1bd1d21b3aea8794b094391344)
to branch 'im.pidgin.rlaager.merging.soc-msnp13-to-svn18164' (head 463b4fa9f067b279f843520d95a822adc86a0a1b)
| 5518 | 1 | /** |
| 2 | * @file group.h Group functions | |
| 3 | * | |
| 4 | * gaim | |
| 5 | * | |
|
9198
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
6 | * Gaim is the legal property of its developers, whose names are too numerous |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 | * source distribution. |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
9 | * |
| 5518 | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by | |
| 12 | * the Free Software Foundation; either version 2 of the License, or | |
| 13 | * (at your option) any later version. | |
| 14 | * | |
| 15 | * This program is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * along with this program; if not, write to the Free Software | |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 | */ | |
| 24 | #ifndef _MSN_GROUP_H_ | |
| 25 | #define _MSN_GROUP_H_ | |
| 26 | ||
| 27 | typedef struct _MsnGroup MsnGroup; | |
| 28 | ||
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
29 | #include <stdio.h> |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
30 | |
| 5518 | 31 | #include "session.h" |
| 32 | #include "user.h" | |
| 13855 | 33 | #include "soap.h" |
| 34 | #include "userlist.h" | |
| 5518 | 35 | |
| 13855 | 36 | #define MSN_ADD_GROUPS "<GroupInfo><name>test111</name><groupType>C8529CE2-6EAD-434d-881F-341E17DB3FF8</groupType><fMessenger>false</fMessenger><annotations><Annotation><Name>MSN.IM.Display</Name><Value>1</Value></Annotation></annotations></GroupInfo>" |
| 37 | ||
| 38 | #define MSN_ADD_GROUP_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>GroupSave</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupAdd xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><groupAddOptions><fRenameOnMsgrConflict>false</fRenameOnMsgrConflict></groupAddOptions><groupInfo>%s</groupInfo></ABGroupAdd></soap:Body></soap:Envelope>" | |
| 39 | ||
| 40 | #define MSN_GROUP_IDS "<guid>9e57e654-59f0-44d1-aedc-0a7500b7e51f</guid>" | |
| 41 | #define MSN_DELETE_GROUP_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupDelete xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><groupFilter><groupIds>%s</groupIds></groupFilter></ABGroupDelete></soap:Body></soap:Envelope>" | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8475
diff
changeset
|
42 | |
| 13861 | 43 | #define MSN_INDIVIDUALS_GROUP_ID "1983" |
| 13856 | 44 | #define MSN_INDIVIDUALS_GROUP_NAME "Other Contacts" |
| 45 | ||
| 13857 | 46 | #define MSN_NON_IM_GROUP_ID "email" |
| 47 | #define MSN_NON_IM_GROUP_NAME "Non-IM Contacts" | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8475
diff
changeset
|
48 | |
| 5518 | 49 | /** |
| 50 | * A group. | |
| 51 | */ | |
| 52 | struct _MsnGroup | |
| 53 | { | |
| 54 | MsnSession *session; /**< The MSN session. */ | |
| 13855 | 55 | MsnSoapConn *soapconn; |
| 5518 | 56 | |
| 13855 | 57 | char *id; /**< The group ID. */ |
| 5518 | 58 | char *name; /**< The name of the group. */ |
| 59 | }; | |
| 60 | ||
| 61 | /**************************************************************************/ | |
| 62 | /** @name Group API */ | |
| 63 | /**************************************************************************/ | |
| 64 | /*@{*/ | |
| 65 | ||
| 66 | /** | |
| 67 | * Creates a new group structure. | |
| 68 | * | |
| 69 | * @param session The MSN session. | |
| 70 | * @param id The group ID. | |
| 71 | * @param name The name of the group. | |
| 72 | * | |
| 73 | * @return A new group structure. | |
| 74 | */ | |
| 13855 | 75 | MsnGroup *msn_group_new(MsnUserList *userlist, const char *id, const char *name); |
| 5518 | 76 | |
| 77 | /** | |
| 78 | * Destroys a group structure. | |
| 79 | * | |
| 80 | * @param group The group to destroy. | |
| 81 | */ | |
| 82 | void msn_group_destroy(MsnGroup *group); | |
| 83 | ||
| 84 | /** | |
| 85 | * Sets the ID for a group. | |
| 86 | * | |
| 87 | * @param group The group. | |
| 88 | * @param id The ID. | |
| 89 | */ | |
| 13855 | 90 | void msn_group_set_id(MsnGroup *group, const char *id); |
| 5518 | 91 | |
| 92 | /** | |
| 93 | * Sets the name for a group. | |
| 94 | * | |
| 95 | * @param group The group. | |
| 96 | * @param name The name. | |
| 97 | */ | |
| 98 | void msn_group_set_name(MsnGroup *group, const char *name); | |
| 99 | ||
| 100 | /** | |
| 101 | * Returns the ID for a group. | |
| 102 | * | |
| 103 | * @param group The group. | |
| 104 | * | |
| 105 | * @return The ID. | |
| 106 | */ | |
| 13855 | 107 | char* msn_group_get_id(const MsnGroup *group); |
| 5518 | 108 | |
| 109 | /** | |
| 110 | * Returns the name for a group. | |
| 111 | * | |
| 112 | * @param group The group. | |
| 113 | * | |
| 114 | * @return The name. | |
| 115 | */ | |
| 116 | const char *msn_group_get_name(const MsnGroup *group); | |
| 117 | #endif /* _MSN_GROUP_H_ */ |