Sun, 20 Jan 2008 03:02:24 +0000
Clean up a few comments, changing from C++ style to C-style if needed, and add a
few comments with associated ticket #s if applicable.
Also, call msim_unrecognized() if unknown status types are received, and use
#defines for msim_error() codes. General cleanup.
|
17930
d8908611bf64
Use symbolic constants for persist messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17924
diff
changeset
|
1 | /* MySpaceIM Protocol Plugin, header file |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
2 | * |
| 18013 | 3 | * Copyright (C) 2007, Jeff Connelly <jeff2@soc.pidgin.im> |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
4 | * |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
5 | * This program is free software; you can redistribute it and/or modify |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
7 | * the Free Software Foundation; either version 2 of the License, or |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
9 | * |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
14 | * |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
16 | * 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:
19741
diff
changeset
|
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
18 | */ |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
19 | |
|
17902
8e0b1d066efb
Add partial implementation of MsimMessage (not used anywhere yet).
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17901
diff
changeset
|
20 | #ifndef _MYSPACE_MYSPACE_H |
|
8e0b1d066efb
Add partial implementation of MsimMessage (not used anywhere yet).
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17901
diff
changeset
|
21 | #define _MYSPACE_MYSPACE_H |
|
8e0b1d066efb
Add partial implementation of MsimMessage (not used anywhere yet).
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17901
diff
changeset
|
22 | |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
23 | /* Other includes */ |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
24 | #include <string.h> |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
25 | #include <errno.h>/* for EAGAIN */ |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
26 | #include <stdarg.h> |
|
18061
76e936ec829e
Implement round() if it is not available, using floor().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18060
diff
changeset
|
27 | #include <math.h> |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
28 | |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
29 | #include <glib.h> |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
30 | |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
31 | #ifdef _WIN32 |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
32 | #include "win32dep.h" |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
33 | #else |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
34 | /* For recv() and send(); needed to match Win32 */ |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
35 | #include <sys/types.h> |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
36 | #include <sys/socket.h> |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
37 | #endif |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
38 | |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
39 | #include "internal.h" |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
40 | |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
41 | #include "notify.h" |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
42 | #include "plugin.h" |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
43 | #include "accountopt.h" |
|
21655
65bd9fa2e9c1
disapproval of revision '4a89985398004a5cfc7b55b698fbff33d6f53b06'
Evan Schoenberg <evands@pidgin.im>
parents:
21654
diff
changeset
|
44 | #include "version.h" |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
45 | #include "cipher.h" /* for SHA-1 */ |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
46 | #include "util.h" /* for base64 */ |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
47 | #include "debug.h" /* for purple_debug_info */ |
|
17995
8ca08f4eface
Add msim_markup_to_html() to convert MySpaceIM-style markup to Purple-compatible
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17993
diff
changeset
|
48 | #include "xmlnode.h" |
|
19620
238f24594c04
Add msim_uri_handler() to handle myim: URLs, sendIM and addContact commands.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19619
diff
changeset
|
49 | #include "core.h" |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
50 | |
|
17910
9bbfa75ba90b
(Incomplete - plugin does not load) Begin migrating protocol message receiving to MsimMessage.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17906
diff
changeset
|
51 | /* MySpaceIM includes */ |
|
19619
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
52 | #include "persist.h" |
|
17910
9bbfa75ba90b
(Incomplete - plugin does not load) Begin migrating protocol message receiving to MsimMessage.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17906
diff
changeset
|
53 | #include "message.h" |
|
19616
017838ce7393
In msimprpl, move zap-related code to a separate module.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19605
diff
changeset
|
54 | #include "session.h" |
|
017838ce7393
In msimprpl, move zap-related code to a separate module.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19605
diff
changeset
|
55 | #include "zap.h" |
|
19618
6c85c0b3b101
In msimprpl, move formatting functions to a markup module. It only exposes
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19616
diff
changeset
|
56 | #include "markup.h" |
|
19619
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
57 | #include "user.h" |
|
17910
9bbfa75ba90b
(Incomplete - plugin does not load) Begin migrating protocol message receiving to MsimMessage.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17906
diff
changeset
|
58 | |
|
17892
66984c1aac79
Re-add RC4 code from Samba, whose use is enabled by not defining
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17890
diff
changeset
|
59 | /* Conditional compilation options */ |
|
18064
527bea0f11ab
Disable sending third-party client version to oncoming buddies.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18061
diff
changeset
|
60 | /* Send third-party client version? (Recognized by us and Miranda's plugin) */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
61 | /*#define MSIM_SEND_CLIENT_VERSION */ |
|
17892
66984c1aac79
Re-add RC4 code from Samba, whose use is enabled by not defining
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17890
diff
changeset
|
62 | |
|
66984c1aac79
Re-add RC4 code from Samba, whose use is enabled by not defining
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17890
diff
changeset
|
63 | /* Debugging options */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
64 | /*#define MSIM_DEBUG_MSG */ |
|
16335
0c2b32acc27a
Replace printf() in MySpaceIM prpl with purple_debug_info().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16333
diff
changeset
|
65 | /* Low-level and rarely needed */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
66 | /*#define MSIM_DEBUG_PARSE */ |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
67 | /*#define MSIM_DEBUG_LOGIN_CHALLENGE*/ |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
68 | /*#define MSIM_DEBUG_RXBUF */ |
|
17892
66984c1aac79
Re-add RC4 code from Samba, whose use is enabled by not defining
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17890
diff
changeset
|
69 | |
|
19796
d61c0b7325d6
In msimprpl, log unrecognized HTML tags received from the IM client, and
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19794
diff
changeset
|
70 | /* Encode unknown HTML tags from IM clients in messages as [tag], instead of |
|
d61c0b7325d6
In msimprpl, log unrecognized HTML tags received from the IM client, and
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19794
diff
changeset
|
71 | * ignoring. Useful for debugging */ |
|
d61c0b7325d6
In msimprpl, log unrecognized HTML tags received from the IM client, and
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19794
diff
changeset
|
72 | /*#define MSIM_MARKUP_SHOW_UNKNOWN_TAGS */ |
|
19794
b8e3b530086e
Add compile-time option MSIM_MARKUP_SHOW_UNKNOWN_TAGS, enabled by default
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19741
diff
changeset
|
73 | |
|
17984
9a53a8583bba
Add msim_unrecognized() to handle unhandled messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17982
diff
changeset
|
74 | /* Define to cause init_plugin() to run some tests and print |
|
9a53a8583bba
Add msim_unrecognized() to handle unhandled messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17982
diff
changeset
|
75 | * the results to the Purple debug log, then exit. Useful to |
|
9a53a8583bba
Add msim_unrecognized() to handle unhandled messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17982
diff
changeset
|
76 | * run with 'pidgin -d' to see the output. Don't define if |
|
9a53a8583bba
Add msim_unrecognized() to handle unhandled messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17982
diff
changeset
|
77 | * you want to actually use the plugin! */ |
|
19160
b22fa2dbfe05
Re-enable non-test mode. This revision now correctly handles links with paths.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19159
diff
changeset
|
78 | /*#define MSIM_SELF_TEST */ |
|
17984
9a53a8583bba
Add msim_unrecognized() to handle unhandled messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17982
diff
changeset
|
79 | |
|
17892
66984c1aac79
Re-add RC4 code from Samba, whose use is enabled by not defining
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17890
diff
changeset
|
80 | /* Constants */ |
|
16335
0c2b32acc27a
Replace printf() in MySpaceIM prpl with purple_debug_info().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16333
diff
changeset
|
81 | |
|
18017
48384af36ad9
Increase password length limit to 10 and update changes file.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18016
diff
changeset
|
82 | /* Maximum length of a password that is acceptable. This is the limit |
|
48384af36ad9
Increase password length limit to 10 and update changes file.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18016
diff
changeset
|
83 | * on the official client (build 679) and on the 'new password' field at |
|
48384af36ad9
Increase password length limit to 10 and update changes file.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18016
diff
changeset
|
84 | * http://settings.myspace.com/index.cfm?fuseaction=user.changepassword |
|
48384af36ad9
Increase password length limit to 10 and update changes file.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18016
diff
changeset
|
85 | * (though curiously, not on the 'current password' field). */ |
|
19510
1917495b301e
No longer check the length of passwords - instead, pass the password to the
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19509
diff
changeset
|
86 | |
|
1917495b301e
No longer check the length of passwords - instead, pass the password to the
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19509
diff
changeset
|
87 | /* Not defined; instead have the client reject the password, until libpurple |
|
1917495b301e
No longer check the length of passwords - instead, pass the password to the
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19509
diff
changeset
|
88 | * supports specifying a length limit on the protocol's password. */ |
|
1917495b301e
No longer check the length of passwords - instead, pass the password to the
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19509
diff
changeset
|
89 | /* #define MSIM_MAX_PASSWORD_LENGTH 10 */ |
|
17998
e739eb3e0567
Fail with our own error message if an entered password is greater than 8
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17995
diff
changeset
|
90 | |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
91 | /* Build version of MySpaceIM to report to servers (1.0.xxx.0) */ |
|
18057
77eb36712aca
Update login process to more closely match official client.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18056
diff
changeset
|
92 | #define MSIM_CLIENT_VERSION 697 |
|
77eb36712aca
Update login process to more closely match official client.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18056
diff
changeset
|
93 | |
|
19741
f6f0aff2ef68
If MSIM_CHECK_NEWER_VERSION is defined (off by default), run (incomplete)
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19739
diff
changeset
|
94 | /* Check for a newer official MySpaceIM client on startup? |
|
f6f0aff2ef68
If MSIM_CHECK_NEWER_VERSION is defined (off by default), run (incomplete)
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19739
diff
changeset
|
95 | * (Mostly useful for developers) */ |
|
f6f0aff2ef68
If MSIM_CHECK_NEWER_VERSION is defined (off by default), run (incomplete)
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19739
diff
changeset
|
96 | /*#define MSIM_CHECK_NEWER_VERSION*/ |
|
f6f0aff2ef68
If MSIM_CHECK_NEWER_VERSION is defined (off by default), run (incomplete)
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19739
diff
changeset
|
97 | |
|
18057
77eb36712aca
Update login process to more closely match official client.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18056
diff
changeset
|
98 | /* Language codes from http://www.microsoft.com/globaldev/reference/oslocversion.mspx */ |
|
77eb36712aca
Update login process to more closely match official client.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18056
diff
changeset
|
99 | #define MSIM_LANGUAGE_ID_ENGLISH 1033 |
|
77eb36712aca
Update login process to more closely match official client.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18056
diff
changeset
|
100 | #define MSIM_LANGUAGE_NAME_ENGLISH "ENGLISH" |
|
18043
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
101 | |
|
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
102 | /* msimprpl version string of this plugin */ |
|
19739
a0f9a1a37a5b
Update msimprpl to 0.18, targetting Pidgin/libpurple 2.2.0. msimprpl 0.17 was
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19738
diff
changeset
|
103 | #define MSIM_PRPL_VERSION_STRING "0.18" |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
104 | |
|
18020
f951defd22fd
Add msim_check_alive(), called every MSIM_KEEPALIVE_INTERVAL_CHECK milliseconds,
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18019
diff
changeset
|
105 | /* Default server */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
106 | #define MSIM_SERVER "im.myspace.akadns.net" |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
107 | #define MSIM_PORT 1863 /* TODO: alternate ports and automatic */ |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
108 | |
|
18020
f951defd22fd
Add msim_check_alive(), called every MSIM_KEEPALIVE_INTERVAL_CHECK milliseconds,
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18019
diff
changeset
|
109 | /* Time between keepalives (seconds) - if no data within this time, is dead. */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
110 | #define MSIM_KEEPALIVE_INTERVAL (3 * 60) |
|
18020
f951defd22fd
Add msim_check_alive(), called every MSIM_KEEPALIVE_INTERVAL_CHECK milliseconds,
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18019
diff
changeset
|
111 | |
|
f951defd22fd
Add msim_check_alive(), called every MSIM_KEEPALIVE_INTERVAL_CHECK milliseconds,
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18019
diff
changeset
|
112 | /* Time to check if alive (milliseconds) */ |
|
18023
11b08b55ff2f
Lower timeout to 2 minutes (to be closer to keepalive of 124 s).
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18022
diff
changeset
|
113 | #define MSIM_KEEPALIVE_INTERVAL_CHECK (30 * 1000) |
|
18020
f951defd22fd
Add msim_check_alive(), called every MSIM_KEEPALIVE_INTERVAL_CHECK milliseconds,
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18019
diff
changeset
|
114 | |
|
18037
038a99b09d35
Add msim_check_mail to check for new mail (called periodically), and
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18036
diff
changeset
|
115 | /* Time to check for new mail (milliseconds) */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
116 | #define MSIM_MAIL_INTERVAL_CHECK (60 * 1000) |
|
18037
038a99b09d35
Add msim_check_mail to check for new mail (called periodically), and
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18036
diff
changeset
|
117 | |
|
038a99b09d35
Add msim_check_mail to check for new mail (called periodically), and
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18036
diff
changeset
|
118 | |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
119 | /* Constants */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
120 | #define HASH_SIZE 0x14 /**< Size of SHA-1 hash for login */ |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
121 | #define NONCE_SIZE 0x20 /**< Half of decoded 'nc' field */ |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
122 | #define MSIM_READ_BUF_SIZE (15 * 1024) /**< Receive buffer size */ |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
123 | #define MSIM_FINAL_STRING "\\final\\" /**< Message end marker */ |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
124 | |
|
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
125 | /* Messages */ |
|
18043
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
126 | #define MSIM_BM_INSTANT 1 |
|
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
127 | #define MSIM_BM_STATUS 100 |
|
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
128 | #define MSIM_BM_ACTION 121 |
|
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
129 | #define MSIM_BM_MEDIA 122 |
|
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
130 | #define MSIM_BM_PROFILE 124 |
|
6c7ea1ce1beb
Support unofficial bm code 200, also used by Miranda IM plugin, to report
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18042
diff
changeset
|
131 | #define MSIM_BM_UNOFFICIAL_CLIENT 200 |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
132 | |
|
17901
ecaeb5f6e531
Replacement magic numbers by symbolic constants.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17899
diff
changeset
|
133 | /* Authentication algorithm for login2 */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
134 | #define MSIM_AUTH_ALGORITHM 196610 |
|
17901
ecaeb5f6e531
Replacement magic numbers by symbolic constants.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17899
diff
changeset
|
135 | |
|
18031
4ebc87fe43d9
Lowercase password before sending it. Closes #2066.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18028
diff
changeset
|
136 | /* Recognized challenge length */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
137 | #define MSIM_AUTH_CHALLENGE_LENGTH 0x40 |
|
18031
4ebc87fe43d9
Lowercase password before sending it. Closes #2066.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18028
diff
changeset
|
138 | |
|
17985
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
139 | /* TODO: obtain IPs of network interfaces from user's machine, instead of |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
140 | * hardcoding these values below (used in msim_compute_login_response). |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
141 | * This is not immediately |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
142 | * important because you can still connect and perform basic |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
143 | * functions of the protocol. There is also a high chance that the addreses |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
144 | * are RFC1918 private, so the servers couldn't do anything with them |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
145 | * anyways except make note of that fact. Probably important for any |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
146 | * kind of direct connection, or file transfer functionality. |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
147 | */ |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
148 | |
|
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
149 | #define MSIM_LOGIN_IP_LIST "\x00\x00\x00\x00\x05\x7f\x00\x00\x01\x00\x00\x00\x00\x0a\x00\x00\x40\xc0\xa8\x58\x01\xc0\xa8\x3c\x01" |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
150 | #define MSIM_LOGIN_IP_LIST_LEN 25 |
|
17985
930a05d4e86f
Use constants for IP address list, defined in myspace.h.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17984
diff
changeset
|
151 | |
|
17933
03228b5c78b5
Show online buddies on buddy list as online.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17930
diff
changeset
|
152 | /* Indexes into status string (0|1|2|3|..., but 0 always empty) */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
153 | #define MSIM_STATUS_ORDINAL_EMPTY 0 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
154 | #define MSIM_STATUS_ORDINAL_UNKNOWNs 1 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
155 | #define MSIM_STATUS_ORDINAL_ONLINE 2 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
156 | #define MSIM_STATUS_ORDINAL_UNKNOWNss 3 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
157 | #define MSIM_STATUS_ORDINAL_HEADLINE 4 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
158 | #define MSIM_STATUS_ORDINAL_UNKNOWNls 5 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
159 | #define MSIM_STATUS_ORDINAL_UNKNOWN 6 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
160 | #define MSIM_STATUS_ORDINAL_UNKNOWN1 7 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
161 | #define MSIM_STATUS_ORDINAL_UNKNOWNp 8 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
162 | #define MSIM_STATUS_ORDINAL_UNKNOWN2 9 |
|
17933
03228b5c78b5
Show online buddies on buddy list as online.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17930
diff
changeset
|
163 | |
|
18007
d9fcb200fff6
Recognize online/away status of buddies on buddy list.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18003
diff
changeset
|
164 | /* Status codes - states a buddy (or you!) can be in. */ |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
165 | #define MSIM_STATUS_CODE_OFFLINE_OR_HIDDEN 0 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
166 | #define MSIM_STATUS_CODE_ONLINE 1 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
167 | #define MSIM_STATUS_CODE_IDLE 2 |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
168 | #define MSIM_STATUS_CODE_AWAY 5 |
|
18024
7059556f0804
General clean up and adding more error-checking.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18023
diff
changeset
|
169 | |
|
18042
390fbe2a4e87
Make DPI and base font point size configurable in account options. This
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18039
diff
changeset
|
170 | |
|
19640
48e64a5069da
On login, get contacts from server using msim_get_contact_list().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19620
diff
changeset
|
171 | /* Inbox status bitfield values for MsimSession.inbox_status. */ |
|
18038
4a904c0a564e
Notify of new inbox messages (friend requests, inbox messages, comments),
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18037
diff
changeset
|
172 | #define MSIM_INBOX_MAIL (1 << 0) |
|
4a904c0a564e
Notify of new inbox messages (friend requests, inbox messages, comments),
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18037
diff
changeset
|
173 | #define MSIM_INBOX_BLOG_COMMENT (1 << 1) |
|
4a904c0a564e
Notify of new inbox messages (friend requests, inbox messages, comments),
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18037
diff
changeset
|
174 | #define MSIM_INBOX_PROFILE_COMMENT (1 << 2) |
|
4a904c0a564e
Notify of new inbox messages (friend requests, inbox messages, comments),
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18037
diff
changeset
|
175 | #define MSIM_INBOX_FRIEND_REQUEST (1 << 3) |
|
4a904c0a564e
Notify of new inbox messages (friend requests, inbox messages, comments),
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18037
diff
changeset
|
176 | #define MSIM_INBOX_PICTURE_COMMENT (1 << 4) |
|
4a904c0a564e
Notify of new inbox messages (friend requests, inbox messages, comments),
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18037
diff
changeset
|
177 | |
|
19640
48e64a5069da
On login, get contacts from server using msim_get_contact_list().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19620
diff
changeset
|
178 | /* Codes for msim_got_contact_list(), to tell what to do afterwards. */ |
|
48e64a5069da
On login, get contacts from server using msim_get_contact_list().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19620
diff
changeset
|
179 | #define MSIM_CONTACT_LIST_INITIAL_FRIENDS 0 |
|
48e64a5069da
On login, get contacts from server using msim_get_contact_list().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19620
diff
changeset
|
180 | #define MSIM_CONTACT_LIST_IMPORT_ALL_FRIENDS 1 |
|
48e64a5069da
On login, get contacts from server using msim_get_contact_list().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19620
diff
changeset
|
181 | #define MSIM_CONTACT_LIST_IMPORT_TOP_FRIENDS 2 |
|
48e64a5069da
On login, get contacts from server using msim_get_contact_list().
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19620
diff
changeset
|
182 | |
|
22290
327e5fda255e
Clean up a few comments, changing from C++ style to C-style if needed, and add a
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
22228
diff
changeset
|
183 | /* Error codes */ |
|
327e5fda255e
Clean up a few comments, changing from C++ style to C-style if needed, and add a
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
22228
diff
changeset
|
184 | #define MSIM_ERROR_INCORRECT_PASSWORD 260 |
|
327e5fda255e
Clean up a few comments, changing from C++ style to C-style if needed, and add a
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
22228
diff
changeset
|
185 | #define MSIM_ERROR_LOGGED_IN_ELSEWHERE 6 |
|
327e5fda255e
Clean up a few comments, changing from C++ style to C-style if needed, and add a
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
22228
diff
changeset
|
186 | |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
187 | /* Functions */ |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
188 | gboolean msim_load(PurplePlugin *plugin); |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
189 | GList *msim_status_types(PurpleAccount *acct); |
|
18053
e0e7522cda38
Allow sending zaps through buddy list menu.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18052
diff
changeset
|
190 | |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
191 | const gchar *msim_list_icon(PurpleAccount *acct, PurpleBuddy *buddy); |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
192 | gboolean msim_send_raw(MsimSession *session, const gchar *msg); |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
193 | |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
194 | void msim_login(PurpleAccount *acct); |
|
19619
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
195 | int msim_send_im(PurpleConnection *gc, const gchar *who, const gchar *message, PurpleMessageFlags flags); |
|
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
196 | unsigned int msim_send_typing(PurpleConnection *gc, const gchar *name, PurpleTypingState state); |
|
18028
85ed2582be94
Support sending some formatted text in instant messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18025
diff
changeset
|
197 | |
|
17970
3c92ce43ddae
Change to use const gchar * where appropriate.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17969
diff
changeset
|
198 | void msim_get_info(PurpleConnection *gc, const gchar *name); |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
199 | |
|
18012
c83766296952
Allow setting status to away or online.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18007
diff
changeset
|
200 | void msim_set_status(PurpleAccount *account, PurpleStatus *status); |
|
18019
dc5d60a5ac54
Add support for idle.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18017
diff
changeset
|
201 | void msim_set_idle(PurpleConnection *gc, int time); |
|
18012
c83766296952
Allow setting status to away or online.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18007
diff
changeset
|
202 | |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
203 | void msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
|
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
204 | void msim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
|
17937
0f30d74fcd9c
Add incomplete msim_add_buddy() implementation.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17935
diff
changeset
|
205 | |
|
22215
cafc97e3a50e
Implement prpl_info->normalize for msimprpl, modified patch from Jaywalker.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
21655
diff
changeset
|
206 | const char *msim_normalize(const PurpleAccount *account, const char *str); |
|
cafc97e3a50e
Implement prpl_info->normalize for msimprpl, modified patch from Jaywalker.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
21655
diff
changeset
|
207 | |
|
17968
c29352b95fa6
Add msim_offline_message() for offline message status. Always return TRUE,
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17966
diff
changeset
|
208 | gboolean msim_offline_message(const PurpleBuddy *buddy); |
|
c29352b95fa6
Add msim_offline_message() for offline message status. Always return TRUE,
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17966
diff
changeset
|
209 | |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
210 | void msim_close(PurpleConnection *gc); |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
211 | |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
212 | char *msim_status_text(PurpleBuddy *buddy); |
|
19149
b9e554509131
Change all code to better match the style of libpurple - use 8-space tabs
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19135
diff
changeset
|
213 | void msim_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full); |
|
18055
ed3a5b60eff6
Use MsimMessage's new list type for status messages.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
18053
diff
changeset
|
214 | GList *msim_actions(PurplePlugin *plugin, gpointer context); |
|
16333
0fdea8ad21cb
Add MySpaceIM header file and reorganize functions.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
diff
changeset
|
215 | |
|
17995
8ca08f4eface
Add msim_markup_to_html() to convert MySpaceIM-style markup to Purple-compatible
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17993
diff
changeset
|
216 | #ifdef MSIM_SELF_TEST |
|
8ca08f4eface
Add msim_markup_to_html() to convert MySpaceIM-style markup to Purple-compatible
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17993
diff
changeset
|
217 | void msim_test_all(void) __attribute__((__noreturn__)); |
|
17981
2e330f731690
Add msim_test_all() and related procedures, to perform basic functionality
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17970
diff
changeset
|
218 | int msim_test_msg(void); |
|
2e330f731690
Add msim_test_all() and related procedures, to perform basic functionality
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17970
diff
changeset
|
219 | int msim_test_escaping(void); |
|
17995
8ca08f4eface
Add msim_markup_to_html() to convert MySpaceIM-style markup to Purple-compatible
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17993
diff
changeset
|
220 | #endif |
|
17981
2e330f731690
Add msim_test_all() and related procedures, to perform basic functionality
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17970
diff
changeset
|
221 | |
|
19616
017838ce7393
In msimprpl, move zap-related code to a separate module.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19605
diff
changeset
|
222 | gboolean msim_send_bm(MsimSession *session, const gchar *who, const gchar *text, int type); |
|
017838ce7393
In msimprpl, move zap-related code to a separate module.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19605
diff
changeset
|
223 | |
|
19619
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
224 | |
|
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
225 | void msim_unrecognized(MsimSession *session, MsimMessage *msg, gchar *note); |
|
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
226 | guint msim_new_reply_callback(MsimSession *session, MSIM_USER_LOOKUP_CB cb, gpointer data); |
|
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
227 | |
|
e9ac2df3fd1b
In msimprpl, move user-related code to a new user module, and move other
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
19618
diff
changeset
|
228 | |
|
17903
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
229 | void init_plugin(PurplePlugin *plugin); |
|
1c344d9266b8
Use MsimMessage via msim_send(), instead of msim_send_raw(). This is a more
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17902
diff
changeset
|
230 | |
|
17902
8e0b1d066efb
Add partial implementation of MsimMessage (not used anywhere yet).
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
17901
diff
changeset
|
231 | #endif /* !_MYSPACE_MYSPACE_H */ |