comparison libpurple/protocols/msn/group.h @ 19797:60bc06498746

Committing khc's msnp14 changes from Trac Ticket #148. --rlaager committer: Richard Laager <rlaager@wiktel.com>
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 15 Apr 2007 04:12:27 +0000
parents 32c366eeeb99
children 723b5a2f91ce
comparison
equal deleted inserted replaced
16121:6167ee79ecd0 19797:60bc06498746
28 28
29 #include <stdio.h> 29 #include <stdio.h>
30 30
31 #include "session.h" 31 #include "session.h"
32 #include "user.h" 32 #include "user.h"
33 #include "soap.h"
34 #include "userlist.h"
33 35
34 #include "userlist.h" 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>"
42
43 #define MSN_INDIVIDUALS_GROUP_ID "1983"
44 #define MSN_INDIVIDUALS_GROUP_NAME "Other Contacts"
45
46 #define MSN_NON_IM_GROUP_ID "email"
47 #define MSN_NON_IM_GROUP_NAME "Non-IM Contacts"
35 48
36 /** 49 /**
37 * A group. 50 * A group.
38 */ 51 */
39 struct _MsnGroup 52 struct _MsnGroup
40 { 53 {
41 MsnSession *session; /**< The MSN session. */ 54 MsnSession *session; /**< The MSN session. */
55 MsnSoapConn *soapconn;
42 56
43 int id; /**< The group ID. */ 57 char *id; /**< The group ID. */
44 char *name; /**< The name of the group. */ 58 char *name; /**< The name of the group. */
45 }; 59 };
46 60
47 /**************************************************************************/ 61 /**************************************************************************/
48 /** @name Group API */ 62 /** @name Group API */
56 * @param id The group ID. 70 * @param id The group ID.
57 * @param name The name of the group. 71 * @param name The name of the group.
58 * 72 *
59 * @return A new group structure. 73 * @return A new group structure.
60 */ 74 */
61 MsnGroup *msn_group_new(MsnUserList *userlist, int id, const char *name); 75 MsnGroup *msn_group_new(MsnUserList *userlist, const char *id, const char *name);
62 76
63 /** 77 /**
64 * Destroys a group structure. 78 * Destroys a group structure.
65 * 79 *
66 * @param group The group to destroy. 80 * @param group The group to destroy.
71 * Sets the ID for a group. 85 * Sets the ID for a group.
72 * 86 *
73 * @param group The group. 87 * @param group The group.
74 * @param id The ID. 88 * @param id The ID.
75 */ 89 */
76 void msn_group_set_id(MsnGroup *group, int id); 90 void msn_group_set_id(MsnGroup *group, const char *id);
77 91
78 /** 92 /**
79 * Sets the name for a group. 93 * Sets the name for a group.
80 * 94 *
81 * @param group The group. 95 * @param group The group.
88 * 102 *
89 * @param group The group. 103 * @param group The group.
90 * 104 *
91 * @return The ID. 105 * @return The ID.
92 */ 106 */
93 int msn_group_get_id(const MsnGroup *group); 107 char* msn_group_get_id(const MsnGroup *group);
94 108
95 /** 109 /**
96 * Returns the name for a group. 110 * Returns the name for a group.
97 * 111 *
98 * @param group The group. 112 * @param group The group.