libpurple/protocols/gg/account.h

Sat, 31 Aug 2013 02:20:52 +0530

author
Ankit Vani <a@nevitus.org>
date
Sat, 31 Aug 2013 02:20:52 +0530
branch
soc.2013.gobjectification
changeset 34904
dee62fd8249d
parent 34304
faf0414a8b51
child 35305
056b8468d470
permissions
-rw-r--r--

Merged default branch

33348
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
1 /* purple
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
2 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
5 * source distribution.
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
6 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
7 * Rewritten from scratch during Google Summer of Code 2012
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
8 * by Tomek Wasilczyk (http://www.wasilczyk.pl).
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
9 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
10 * Previously implemented by:
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
11 * - Arkadiusz Miskiewicz <misiek@pld.org.pl> - first implementation (2001);
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
12 * - Bartosz Oler <bartosz@bzimage.us> - reimplemented during GSoC 2005;
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
13 * - Krzysztof Klinikowski <grommasher@gmail.com> - some parts (2009-2011).
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
14 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
15 * This program is free software; you can redistribute it and/or modify
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
16 * it under the terms of the GNU General Public License as published by
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
17 * the Free Software Foundation; either version 2 of the License, or
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
18 * (at your option) any later version.
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
19 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
20 * This program is distributed in the hope that it will be useful,
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
23 * GNU General Public License for more details.
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
24 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
25 * You should have received a copy of the GNU General Public License
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
26 * along with this program; if not, write to the Free Software
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
28 */
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33310
diff changeset
29
33303
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
30 #ifndef _GGP_ACCOUNT_H
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
31 #define _GGP_ACCOUNT_H
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
32
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
33 #include <internal.h>
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
34
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
35 typedef struct
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
36 {
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
37 gchar *id;
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
38 gpointer data;
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
39 size_t size;
34304
faf0414a8b51 Fix most of libpurple warnings about -Wsign-compare
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33348
diff changeset
40 guint length;
33303
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
41 } ggp_account_token;
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
42
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
43 /**
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
44 * token must be free'd with ggp_account_token_free
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
45 */
33309
bc2f2ea7b5ab Gadu-Gadu: refactoring of account registration done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33305
diff changeset
46 typedef void (*ggp_account_token_cb)(PurpleConnection *gc,
bc2f2ea7b5ab Gadu-Gadu: refactoring of account registration done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33305
diff changeset
47 ggp_account_token *token, gpointer user_data);
33303
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
48
33309
bc2f2ea7b5ab Gadu-Gadu: refactoring of account registration done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33305
diff changeset
49 void ggp_account_token_request(PurpleConnection *gc,
bc2f2ea7b5ab Gadu-Gadu: refactoring of account registration done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33305
diff changeset
50 ggp_account_token_cb callback, void *user_data);
33310
5d38cff87be2 Gadu-Gadu: refactoring of password change
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33309
diff changeset
51 gboolean ggp_account_token_validate(ggp_account_token *token,
5d38cff87be2 Gadu-Gadu: refactoring of password change
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33309
diff changeset
52 const gchar *value);
33303
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
53 void ggp_account_token_free(ggp_account_token *token);
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
54
33305
41e5ff454167 Gadu-Gadu: ggp_purple_request_processing implementation; refactoring of account registration (first stage); cancellable token request
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33303
diff changeset
55
41e5ff454167 Gadu-Gadu: ggp_purple_request_processing implementation; refactoring of account registration (first stage); cancellable token request
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33303
diff changeset
56 void ggp_account_register(PurpleAccount *account);
41e5ff454167 Gadu-Gadu: ggp_purple_request_processing implementation; refactoring of account registration (first stage); cancellable token request
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33303
diff changeset
57
33310
5d38cff87be2 Gadu-Gadu: refactoring of password change
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33309
diff changeset
58 void ggp_account_chpass(PurpleConnection *gc);
5d38cff87be2 Gadu-Gadu: refactoring of password change
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33309
diff changeset
59
33303
50f7a92eeb90 Gadu-Gadu: code refactoring - token request, proxy setup (deprecated)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
60 #endif /* _GGP_ACCOUNT_H */

mercurial