Mon, 10 Feb 2014 16:22:00 +0530
Merged default branch
| 5309 | 1 | /** |
| 2 | * @file notification.h Notification server functions | |
| 3 | * | |
| 15884 | 4 | * purple |
| 5309 | 5 | * |
| 15884 | 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 | 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 | |
|
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 | 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 | 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 | |
|
30415
8494ca0058ec
I found these by running "strings" on some MSN binary files. Doesn't seem
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
31 | /* MSNP18 challenge: WLM Version 2009 (Build 14.0.8089.726) */ |
|
8494ca0058ec
I found these by running "strings" on some MSN binary files. Doesn't seem
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
32 | #define MSNP18_WLM_PRODUCT_KEY "C1BX{V4W}Q3*10SM" |
|
8494ca0058ec
I found these by running "strings" on some MSN binary files. Doesn't seem
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
33 | #define MSNP18_WLM_PRODUCT_ID "PROD0120PW!CCV9@" |
|
8494ca0058ec
I found these by running "strings" on some MSN binary files. Doesn't seem
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
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 | /* 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
|
36 | #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
|
37 | #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
|
38 | |
|
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
|
39 | /* MSNP13 challenge */ |
| 13854 | 40 | #define MSNP13_WLM_PRODUCT_KEY "O4BG@C7BWLYQX?5G" |
| 41 | #define MSNP13_WLM_PRODUCT_ID "PROD01065C%ZFN6F" | |
| 42 | ||
| 43 | #define MSNP10_PRODUCT_KEY "VT6PX?UQTM4WM%YR" | |
|
23441
fd45c23a3eb2
Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20597
diff
changeset
|
44 | #define MSNP10_PRODUCT_ID "PROD0038W!61ZTF9" |
| 13854 | 45 | |
|
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 "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
|
47 | #include "msg.h" |
| 5309 | 48 | #include "session.h" |
| 49 | #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
|
50 | #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
|
51 | #include "user.h" |
|
30953
371f2b4678f0
Notification needs the userlist.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29456
diff
changeset
|
52 | #include "userlist.h" |
| 5309 | 53 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
54 | struct _MsnNotification |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
55 | { |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
56 | MsnSession *session; |
|
23445
ea4212194830
Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23441
diff
changeset
|
57 | |
|
ea4212194830
Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23441
diff
changeset
|
58 | /** |
|
ea4212194830
Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23441
diff
changeset
|
59 | * This is a convenience pointer that always points to |
|
ea4212194830
Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23441
diff
changeset
|
60 | * servconn->cmdproc |
|
ea4212194830
Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23441
diff
changeset
|
61 | */ |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
62 | MsnCmdProc *cmdproc; |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
63 | MsnServConn *servconn; |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
64 | |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
65 | gboolean in_use; |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
66 | }; |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
67 | |
|
25773
81ed6eacab59
*** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents:
25680
diff
changeset
|
68 | 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
|
69 | |
|
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
|
70 | /* 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
|
71 | 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
|
72 | 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
|
73 | 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
|
74 | 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
|
75 | 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
|
76 | |
|
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
|
77 | } 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
|
78 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
79 | void msn_notification_end(void); |
|
8808
1cb5ddf6b625
[gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8583
diff
changeset
|
80 | void msn_notification_init(void); |
|
1cb5ddf6b625
[gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8583
diff
changeset
|
81 | |
|
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_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
|
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 | 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
|
85 | 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
|
86 | |
|
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
|
87 | 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
|
88 | const char *payload, int payload_len, |
|
25773
81ed6eacab59
*** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents:
25680
diff
changeset
|
89 | 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
|
90 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
91 | MsnNotification *msn_notification_new(MsnSession *session); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
92 | void msn_notification_destroy(MsnNotification *notification); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
93 | 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
|
94 | const char *host, int port); |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8808
diff
changeset
|
95 | void msn_notification_disconnect(MsnNotification *notification); |
| 13866 | 96 | void msn_notification_dump_contact(MsnSession *session); |
|
8808
1cb5ddf6b625
[gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8583
diff
changeset
|
97 | |
|
32091
5061380d9fee
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31076
diff
changeset
|
98 | void msn_notification_send_uum(MsnSession *session, MsnMessage *msg); |
|
5061380d9fee
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31076
diff
changeset
|
99 | |
|
29420
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(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
|
101 | |
|
c81c525111db
Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25773
diff
changeset
|
102 | 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
|
103 | |
|
c81c525111db
Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25773
diff
changeset
|
104 | 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
|
105 | |
|
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
|
106 | 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
|
107 | 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
|
108 | 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
|
109 | 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
|
110 | |
|
32091
5061380d9fee
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31076
diff
changeset
|
111 | void msn_notification_send_circle_auth(MsnSession *session, const char *ticket); |
|
5061380d9fee
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31076
diff
changeset
|
112 | |
|
10463
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 | * Closes a notification. |
|
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
115 | * |
|
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
116 | * It's first closed, and then disconnected. |
|
23441
fd45c23a3eb2
Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20597
diff
changeset
|
117 | * |
|
10463
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
118 | * @param notification The notification object to close. |
|
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
119 | */ |
|
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
120 | void msn_notification_close(MsnNotification *notification); |
|
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
121 | |
|
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
|
122 | void msn_got_login_params(MsnSession *session, const char *ticket, const char *response); |
| 5309 | 123 | |
|
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
|
124 | #endif /* MSN_NOTIFICATION_H */ |