libpurple/protocols/msn/notification.h

Sat, 06 Feb 2010 05:26:27 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Sat, 06 Feb 2010 05:26:27 +0000
branch
cpw.qulogic.msnp16
changeset 29456
17817920f7a0
parent 29305
202cb72ed5b0
parent 29450
9acb8d4f3da7
child 30933
e8fb33bb8635
child 30953
371f2b4678f0
permissions
-rw-r--r--

propagate from branch 'im.pidgin.pidgin' (head 7da7e48a6444806b19290a54d54bcf86bba3f508)
to branch 'im.pidgin.cpw.qulogic.msnp16' (head 507fafef57a4e95d2d8d767d5d3de1477caa44c9)

5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file notification.h Notification server functions
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
4 * purple
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
9198
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: 5309
diff changeset
9 *
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * (at your option) any later version.
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 *
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * GNU General Public License for more details.
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 *
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 15884
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 */
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
24 #ifndef MSN_NOTIFICATION_H
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
25 #define MSN_NOTIFICATION_H
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
27 typedef struct _MsnNotification MsnNotification;
23755
6b2413139fae Patch 1 from Qulogic, this one mostly updates the version sent by pidgin
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20597
diff changeset
28
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
29 /* MSN protocol challenge info */
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
30
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
31 /* MSNP15 challenge: WLM 8.5.1288.816 */
23755
6b2413139fae Patch 1 from Qulogic, this one mostly updates the version sent by pidgin
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20597
diff changeset
32 #define MSNP15_WLM_PRODUCT_KEY "ILTXC!4IXB5FB*PX"
6b2413139fae Patch 1 from Qulogic, this one mostly updates the version sent by pidgin
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20597
diff changeset
33 #define MSNP15_WLM_PRODUCT_ID "PROD0119GSJUC$18"
6b2413139fae Patch 1 from Qulogic, this one mostly updates the version sent by pidgin
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20597
diff changeset
34
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
35 /* MSNP13 challenge */
13854
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
36 #define MSNP13_WLM_PRODUCT_KEY "O4BG@C7BWLYQX?5G"
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
37 #define MSNP13_WLM_PRODUCT_ID "PROD01065C%ZFN6F"
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
38
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
39 #define MSNP10_PRODUCT_KEY "VT6PX?UQTM4WM%YR"
23441
fd45c23a3eb2 Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 20597
diff changeset
40 #define MSNP10_PRODUCT_ID "PROD0038W!61ZTF9"
13854
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
41
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
42 #include "cmdproc.h"
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
43 #include "msg.h"
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 #include "session.h"
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 #include "servconn.h"
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
46 #include "state.h"
25153
7e8bdb57a11f Make the add/remove buddy from list functions take a MsnUser* instead of the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23787
diff changeset
47 #include "user.h"
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
49 struct _MsnNotification
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
50 {
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
51 MsnSession *session;
23445
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
52
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
53 /**
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
54 * This is a convenience pointer that always points to
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
55 * servconn->cmdproc
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
56 */
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
57 MsnCmdProc *cmdproc;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
58 MsnServConn *servconn;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
59
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
60 gboolean in_use;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
61 };
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
62
25773
81ed6eacab59 *** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents: 25680
diff changeset
63 typedef void (*MsnFqyCb)(MsnSession *session, const char *passport, MsnNetwork network, gpointer data);
25680
a193b015a9da Generalize the FQY command so it can be used by different callbacks based
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25153
diff changeset
64
29450
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
65 /* Type used for msn_notification_send_uun */
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
66 typedef enum {
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
67 MSN_UNIFIED_NOTIFICATION_SHARED_FOLDERS = 1,
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
68 MSN_UNIFIED_NOTIFICATION_UNKNOWN1 = 2,
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
69 MSN_UNIFIED_NOTIFICATION_P2P = 3,
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
70 MSN_UNIFIED_NOTIFICATION_MPOP = 4
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
71
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
72 } MsnUnifiedNotificationType;
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
73
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
74 void uum_send_msg(MsnSession *session, MsnMessage *msg);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
75
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
76 void msn_notification_end(void);
8808
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
77 void msn_notification_init(void);
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
78
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20481
diff changeset
79 void msn_notification_add_buddy_to_list(MsnNotification *notification,
25153
7e8bdb57a11f Make the add/remove buddy from list functions take a MsnUser* instead of the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23787
diff changeset
80 MsnListId list_id, MsnUser *user);
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20481
diff changeset
81 void msn_notification_rem_buddy_from_list(MsnNotification *notification,
25153
7e8bdb57a11f Make the add/remove buddy from list functions take a MsnUser* instead of the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23787
diff changeset
82 MsnListId list_id, MsnUser *user);
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20481
diff changeset
83
25680
a193b015a9da Generalize the FQY command so it can be used by different callbacks based
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25153
diff changeset
84 void msn_notification_send_fqy(MsnSession *session,
a193b015a9da Generalize the FQY command so it can be used by different callbacks based
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25153
diff changeset
85 const char *payload, int payload_len,
25773
81ed6eacab59 *** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents: 25680
diff changeset
86 MsnFqyCb cb, gpointer cb_data);
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20481
diff changeset
87
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
88 MsnNotification *msn_notification_new(MsnSession *session);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
89 void msn_notification_destroy(MsnNotification *notification);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
90 gboolean msn_notification_connect(MsnNotification *notification,
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20481
diff changeset
91 const char *host, int port);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
92 void msn_notification_disconnect(MsnNotification *notification);
13866
b6a2c8d390ef [gaim-migrate @ 16716]
Ma Yuan <mayuan2006@gmail.com>
parents: 13856
diff changeset
93 void msn_notification_dump_contact(MsnSession *session);
8808
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
94
29420
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
95 void msn_notification_send_uux(MsnSession *session, const char *payload);
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
96
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
97 void msn_notification_send_uux_endpointdata(MsnSession *session);
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
98
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
99 void msn_notification_send_uux_private_endpointdata(MsnSession *session);
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
100
29450
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
101 void msn_notification_send_uun(MsnSession *session,
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
102 const char *user,
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
103 MsnUnifiedNotificationType type,
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
104 const char *payload);
9acb8d4f3da7 Support receiving UBN and sending UUN, which seem to have been added way
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 29420
diff changeset
105
10463
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
106 /**
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
107 * Closes a notification.
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
108 *
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
109 * It's first closed, and then disconnected.
23441
fd45c23a3eb2 Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 20597
diff changeset
110 *
10463
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
111 * @param notification The notification object to close.
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
112 */
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
113 void msn_notification_close(MsnNotification *notification);
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
114
23755
6b2413139fae Patch 1 from Qulogic, this one mostly updates the version sent by pidgin
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20597
diff changeset
115 void msn_got_login_params(MsnSession *session, const char *ticket, const char *response);
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116
29305
202cb72ed5b0 Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents: 25773
diff changeset
117 #endif /* MSN_NOTIFICATION_H */

mercurial