aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2013-04-20 14:05:55 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2013-04-20 14:05:55 +0100
commite31e5b8f340a162180830dbe42dd438e59591cfd (patch)
tree029bbb166fda2e9b98a041039338835beb35a08e /protocols
parent9b2a8c10b61540c3c6892a4de7f52bf8657d455e (diff)
parentbfafb99e6162b72e0f1ca7639de05f2b7bb3b23c (diff)
Merging "storage" branch which I wrote long ago. It separates generation of
XML-formatted user configs from disk I/O so we can try to start using other mechanisms to store them (a REST API or something, for example).
Diffstat (limited to 'protocols')
-rw-r--r--protocols/account.c10
-rw-r--r--protocols/account.h1
-rw-r--r--protocols/jabber/jabber.c2
-rw-r--r--protocols/msn/msn.c2
-rw-r--r--protocols/oscar/oscar.c2
-rw-r--r--protocols/skype/skype.c6
-rw-r--r--protocols/twitter/twitter_lib.c8
7 files changed, 11 insertions, 20 deletions
diff --git a/protocols/account.c b/protocols/account.c
index e9388710..dec9c3ea 100644
--- a/protocols/account.c
+++ b/protocols/account.c
@@ -52,7 +52,7 @@ account_t *account_add( bee_t *bee, struct prpl *prpl, char *user, char *pass )
a->bee = bee;
s = set_add( &a->set, "auto_connect", "true", set_eval_account, a );
- s->flags |= ACC_SET_NOSAVE;
+ s->flags |= SET_NOSAVE;
s = set_add( &a->set, "auto_reconnect", "true", set_eval_bool, a );
@@ -60,16 +60,16 @@ account_t *account_add( bee_t *bee, struct prpl *prpl, char *user, char *pass )
s->flags |= SET_NULL_OK;
s = set_add( &a->set, "nick_source", "handle", set_eval_nick_source, a );
- s->flags |= ACC_SET_NOSAVE; /* Just for bw compatibility! */
+ s->flags |= SET_NOSAVE; /* Just for bw compatibility! */
s = set_add( &a->set, "password", NULL, set_eval_account, a );
- s->flags |= ACC_SET_NOSAVE | SET_NULL_OK | SET_PASSWORD;
+ s->flags |= SET_NOSAVE | SET_NULL_OK | SET_PASSWORD;
s = set_add( &a->set, "tag", NULL, set_eval_account, a );
- s->flags |= ACC_SET_NOSAVE;
+ s->flags |= SET_NOSAVE;
s = set_add( &a->set, "username", NULL, set_eval_account, a );
- s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY;
+ s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY;
set_setstr( &a->set, "username", user );
/* Hardcode some more clever tag guesses. */
diff --git a/protocols/account.h b/protocols/account.h
index 84f0ec36..ed3ca531 100644
--- a/protocols/account.h
+++ b/protocols/account.h
@@ -60,7 +60,6 @@ int account_reconnect_delay( account_t *a );
typedef enum
{
- ACC_SET_NOSAVE = 0x01, /* Don't save this setting (i.e. stored elsewhere). */
ACC_SET_OFFLINE_ONLY = 0x02, /* Allow changes only if the acct is offline. */
ACC_SET_ONLINE_ONLY = 0x04, /* Allow changes only if the acct is online. */
} account_set_flag_t;
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 56263192..dab4afdf 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -79,7 +79,7 @@ static void jabber_init( account_t *acc )
s->flags |= ACC_SET_OFFLINE_ONLY | SET_HIDDEN_DEFAULT;
s = set_add( &acc->set, "server", NULL, set_eval_account, acc );
- s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
+ s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
s = set_add( &acc->set, "ssl", "false", set_eval_bool, acc );
s->flags |= ACC_SET_OFFLINE_ONLY;
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c
index 052ff692..ad01ca24 100644
--- a/protocols/msn/msn.c
+++ b/protocols/msn/msn.c
@@ -38,7 +38,7 @@ static void msn_init( account_t *acc )
set_t *s;
s = set_add( &acc->set, "display_name", NULL, set_eval_display_name, acc );
- s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
+ s->flags |= SET_NOSAVE | ACC_SET_ONLINE_ONLY;
set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc );
set_add( &acc->set, "switchboard_keepalives", "false", set_eval_bool, acc );
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index 0a1de519..05be086d 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -377,7 +377,7 @@ static void oscar_init(account_t *acc)
s = set_add(&acc->set, "server",
icq ? AIM_DEFAULT_LOGIN_SERVER_ICQ
: AIM_DEFAULT_LOGIN_SERVER_AIM, set_eval_account, acc);
- s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY;
+ s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY;
if (icq) {
s = set_add(&acc->set, "web_aware", "false", set_eval_bool, acc);
diff --git a/protocols/skype/skype.c b/protocols/skype/skype.c
index f6c0a261..7ce562d4 100644
--- a/protocols/skype/skype.c
+++ b/protocols/skype/skype.c
@@ -1560,16 +1560,16 @@ static void skype_init(account_t *acc)
s = set_add(&acc->set, "display_name", NULL, skype_set_display_name,
acc);
- s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
+ s->flags |= SET_NOSAVE | ACC_SET_ONLINE_ONLY;
s = set_add(&acc->set, "mood_text", NULL, skype_set_mood_text, acc);
s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
s = set_add(&acc->set, "call", NULL, skype_set_call, acc);
- s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
+ s->flags |= SET_NOSAVE | ACC_SET_ONLINE_ONLY;
s = set_add(&acc->set, "balance", NULL, skype_set_balance, acc);
- s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
+ s->flags |= SET_NOSAVE | ACC_SET_ONLINE_ONLY;
s = set_add(&acc->set, "skypeout_offline", "true", set_eval_bool, acc);
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index ccbfeb2d..05222af2 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -39,14 +39,6 @@
#include <ctype.h>
#include <errno.h>
-/* GLib < 2.12.0 doesn't have g_ascii_strtoll(), work around using system strtoll(). */
-/* GLib < 2.12.4 can be buggy: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488013 */
-#if !GLIB_CHECK_VERSION(2,12,5)
-#include <stdlib.h>
-#include <limits.h>
-#define g_ascii_strtoll strtoll
-#endif
-
#define TXL_STATUS 1
#define TXL_USER 2
#define TXL_ID 3