libpurple/protocols/msn/notification.h

Tue, 22 Jun 2010 22:44:28 +0000

author
Jorge Villaseñor <masca@cpw.pidgin.im>
date
Tue, 22 Jun 2010 22:44:28 +0000
branch
soc.2010.msn-tlc
changeset 31025
17ce2e75854d
parent 30953
371f2b4678f0
child 31055
3047e75048c8
permissions
-rw-r--r--

Destroy Parts when the SlpMessage is destroyed.

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"
30953
371f2b4678f0 Notification needs the userlist.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 29456
diff changeset
48 #include "userlist.h"
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
50 struct _MsnNotification
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
51 {
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
52 MsnSession *session;
23445
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 /**
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
55 * This is a convenience pointer that always points to
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
56 * servconn->cmdproc
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
57 */
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
58 MsnCmdProc *cmdproc;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
59 MsnServConn *servconn;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
60
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
61 gboolean in_use;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
62 };
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
63
25773
81ed6eacab59 *** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents: 25680
diff changeset
64 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
65
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
66 /* 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
67 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
68 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
69 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
70 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
71 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
72
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 } 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
74
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
75 void uum_send_msg(MsnSession *session, MsnMessage *msg);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
76
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
77 void msn_notification_end(void);
8808
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
78 void msn_notification_init(void);
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
79
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
80 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
81 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
82 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
83 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
84
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
85 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
86 const char *payload, int payload_len,
25773
81ed6eacab59 *** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents: 25680
diff changeset
87 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
88
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
89 MsnNotification *msn_notification_new(MsnSession *session);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
90 void msn_notification_destroy(MsnNotification *notification);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
91 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
92 const char *host, int port);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
93 void msn_notification_disconnect(MsnNotification *notification);
13866
b6a2c8d390ef [gaim-migrate @ 16716]
Ma Yuan <mayuan2006@gmail.com>
parents: 13856
diff changeset
94 void msn_notification_dump_contact(MsnSession *session);
8808
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
95
29420
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
96 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
97
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
98 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
99
c81c525111db Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25773
diff changeset
100 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
101
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
102 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
103 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
104 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
105 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
106
10463
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
107 /**
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
108 * Closes a notification.
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
109 *
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
110 * It's first closed, and then disconnected.
23441
fd45c23a3eb2 Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 20597
diff changeset
111 *
10463
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
112 * @param notification The notification object to close.
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
113 */
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
114 void msn_notification_close(MsnNotification *notification);
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
115
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
116 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
117
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
118 #endif /* MSN_NOTIFICATION_H */

mercurial