libpurple/protocols/msn/notification.h

Sat, 20 Jun 2009 18:27:49 +0000

author
Ka-Hing Cheung <khc@pidgin.im>
date
Sat, 20 Jun 2009 18:27:49 +0000
branch
release-2.5.7
changeset 25773
81ed6eacab59
parent 25680
a193b015a9da
child 29305
202cb72ed5b0
child 29420
c81c525111db
permissions
-rw-r--r--

*** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Treat FQY responses with no network ID as on the Passport network.

Fixes #9240.

*** Plucked rev 76f13d0fc7fbff369d01187fcc1b8f517854e119 (qulogic@pidgin.im):
These strcmp checks are for equality, meaning a return of 0.

*** Plucked rev a7bd74cbe46498f1390a4d33cce115bdd123a68d (qulogic@pidgin.im):
Add a data parameter for FQY callbacks and remove the pending users list
that was previously used instead.

*** Plucked rev 84f6765b71f2ad2d6c7cddd461114ab5fc758b72 (qulogic@pidgin.im):
We can't get an ADD error if we never send an ADD command.

*** Plucked rev 6d3a0b29b22baeedf393b76044dde689caef3b45 (qulogic@pidgin.im):
Add a msn_notification_post_rml analog.

*** Plucked rev 0e2af7d2799397628273f534fac31e6dd7c6fe14 (qulogic@pidgin.im):
Remove some left over code.

*** Plucked rev 0841af13da028245cc279ce8f927ff05c0367ae1 (qulogic@pidgin.im):
Check network type, and send an FQY if necessary, when modifying the allow
and block lists. Before, users who were not added by you (i.e. spammers)
would have no network type and cause disconnects. This should fix it.

Fixes #8977.

*** Plucked rev a1463341c3bf211c429282870babdb4785c7d817 (qulogic@pidgin.im):
Remove notification-server group commands ADG, REG, RMG as groups are now
handled in the AddressBook with SOAP calls.

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 */
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #ifndef _MSN_NOTIFICATION_H_
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #define _MSN_NOTIFICATION_H_
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
13854
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
27 /*MSN protocol challenge info*/
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
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
29 /*MSNP15 challenge: WLM 8.5.1288.816*/
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
30 #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
31 #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
32
13854
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
33 /*MSNP13 challenge*/
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
34 #define MSNP13_WLM_PRODUCT_KEY "O4BG@C7BWLYQX?5G"
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
35 #define MSNP13_WLM_PRODUCT_ID "PROD01065C%ZFN6F"
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
36
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
37 #define MSNP10_PRODUCT_KEY "VT6PX?UQTM4WM%YR"
23441
fd45c23a3eb2 Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 20597
diff changeset
38 #define MSNP10_PRODUCT_ID "PROD0038W!61ZTF9"
13854
ab947cf0c2bb [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 10481
diff changeset
39
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
40 typedef struct _MsnNotification MsnNotification;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
41
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 #include "session.h"
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 #include "servconn.h"
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
44 #include "cmdproc.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
45 #include "user.h"
5309
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
47 struct _MsnNotification
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
48 {
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
49 MsnSession *session;
23445
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
50
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
51 /**
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
52 * This is a convenience pointer that always points to
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
53 * servconn->cmdproc
ea4212194830 Minor documentation and whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23441
diff changeset
54 */
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
55 MsnCmdProc *cmdproc;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
56 MsnServConn *servconn;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
57
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
58 gboolean in_use;
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
25773
81ed6eacab59 *** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents: 25680
diff changeset
61 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
62
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
63 #include "state.h"
13870
258d48d6ab52 [gaim-migrate @ 16737]
Ma Yuan <mayuan2006@gmail.com>
parents: 13866
diff changeset
64 void uum_send_msg(MsnSession *session,MsnMessage *msg);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
65
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
66 void msn_notification_end(void);
8808
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
67 void msn_notification_init(void);
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
68
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
69 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
70 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
71 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
72 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
73
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
74 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
75 const char *payload, int payload_len,
25773
81ed6eacab59 *** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im):
Ka-Hing Cheung <khc@pidgin.im>
parents: 25680
diff changeset
76 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
77
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
78 MsnNotification *msn_notification_new(MsnSession *session);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
79 void msn_notification_destroy(MsnNotification *notification);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
80 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
81 const char *host, int port);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8808
diff changeset
82 void msn_notification_disconnect(MsnNotification *notification);
13866
b6a2c8d390ef [gaim-migrate @ 16716]
Ma Yuan <mayuan2006@gmail.com>
parents: 13856
diff changeset
83 void msn_notification_dump_contact(MsnSession *session);
8808
1cb5ddf6b625 [gaim-migrate @ 9570]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 8583
diff changeset
84
10463
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
85 /**
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
86 * Closes a notification.
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
87 *
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
88 * It's first closed, and then disconnected.
23441
fd45c23a3eb2 Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 20597
diff changeset
89 *
10463
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
90 * @param notification The notification object to close.
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
91 */
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
92 void msn_notification_close(MsnNotification *notification);
f2f97738b401 [gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
93
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
94 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
95
3178acad1449 [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 #endif /* _MSN_NOTIFICATION_H_ */

mercurial