/soc/2015/nakulgulati/main: 56c52aa86465: Added status types
Nakul at rock.pidgin.im
Nakul at rock.pidgin.im
Tue Jun 23 02:53:40 EDT 2015
Changeset: 56c52aa8646573efebb45b1dd05d9acbf526ec49
Author: Nakul Gulati
Date: 2015-06-16 17:42 +0800
Branch: hangouts
URL: https://hg.pidgin.im/soc/2015/nakulgulati/main/rev/56c52aa86465
Description:
Added status types
diffstat:
configure.ac | 11 +++++------
libpurple/protocols/Makefile.am | 2 +-
libpurple/protocols/Makefile.mingw | 2 +-
libpurple/protocols/hangouts/hangouts.c | 19 ++++++++++++++++++-
4 files changed, 25 insertions(+), 9 deletions(-)
diffs (116 lines):
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1456,8 +1456,8 @@ for i in $STATIC_PRPLS ; do
case $i in
bonjour) static_bonjour=yes ;;
+ gg) static_gg=yes ;;
hangouts) static_hangouts=yes ;;
- gg) static_gg=yes ;;
irc) static_irc=yes ;;
jabber) static_jabber=yes ;;
msn) static_msn=yes ;;
@@ -1475,8 +1475,8 @@ for i in $STATIC_PRPLS ; do
esac
done
AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
+AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
AM_CONDITIONAL(STATIC_HANGOUTS, test "x$static_hangouts" = "xyes")
-AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
@@ -1496,7 +1496,7 @@ AC_DEFINE_UNQUOTED(STATIC_PROTO_UNLOAD,
AC_ARG_WITH(dynamic_prpls, [AS_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
if test "x$DYNAMIC_PRPLS" = "xall" ; then
- DYNAMIC_PRPLS="bonjour hangouts gg irc jabber msn mxit novell oscar sametime silc simple yahoo zephyr"
+ DYNAMIC_PRPLS="bonjour gg hangouts irc jabber msn mxit novell oscar sametime silc simple yahoo zephyr"
fi
if test "x$have_meanwhile" != "xyes"; then
DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
@@ -1514,14 +1514,13 @@ AC_SUBST(DYNAMIC_PRPLS)
for i in $DYNAMIC_PRPLS ; do
case $i in
bonjour) dynamic_bonjour=yes ;;
+ gg) dynamic_gg=yes ;;
hangouts) dynamic_hangouts=yes ;;
- gg) dynamic_gg=yes ;;
irc) dynamic_irc=yes ;;
jabber) dynamic_jabber=yes ;;
msn) dynamic_msn=yes ;;
mxit) dynamic_mxit=yes ;;
novell) dynamic_novell=yes ;;
- null) dynamic_null=yes ;;
oscar) dynamic_oscar=yes ;;
aim) dynamic_oscar=yes ;;
icq) dynamic_oscar=yes ;;
@@ -2763,8 +2762,8 @@ AC_CONFIG_FILES([Makefile
libpurple/Makefile
libpurple/protocols/Makefile
libpurple/protocols/bonjour/Makefile
+ libpurple/protocols/gg/Makefile
libpurple/protocols/hangouts/Makefile
- libpurple/protocols/gg/Makefile
libpurple/protocols/irc/Makefile
libpurple/protocols/jabber/Makefile
libpurple/protocols/msn/Makefile
diff --git a/libpurple/protocols/Makefile.am b/libpurple/protocols/Makefile.am
--- a/libpurple/protocols/Makefile.am
+++ b/libpurple/protocols/Makefile.am
@@ -1,5 +1,5 @@
EXTRA_DIST = Makefile.mingw
-DIST_SUBDIRS = bonjour gg hangouts irc jabber msn mxit novell null oscar sametime silc simple yahoo zephyr
+DIST_SUBDIRS = bonjour gg hangouts irc jabber msn mxit novell oscar sametime silc simple yahoo zephyr
SUBDIRS = $(DYNAMIC_PRPLS) $(STATIC_PRPLS)
diff --git a/libpurple/protocols/Makefile.mingw b/libpurple/protocols/Makefile.mingw
--- a/libpurple/protocols/Makefile.mingw
+++ b/libpurple/protocols/Makefile.mingw
@@ -8,7 +8,7 @@
PIDGIN_TREE_TOP := ../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
-SUBDIRS = gg irc jabber msn mxit novell null oscar sametime silc simple yahoo bonjour hangouts
+SUBDIRS = gg irc jabber msn mxit novell oscar sametime silc simple yahoo bonjour hangouts
.PHONY: all install clean
diff --git a/libpurple/protocols/hangouts/hangouts.c b/libpurple/protocols/hangouts/hangouts.c
--- a/libpurple/protocols/hangouts/hangouts.c
+++ b/libpurple/protocols/hangouts/hangouts.c
@@ -36,6 +36,11 @@ static PurpleProtocol *my_protocol = NUL
static void
hangouts_login(PurpleAccount *acct)
{
+ PurpleConnection *gc = purple_account_get_connection(acct);
+ const char *username = purple_account_get_username(acct);
+
+ printf("Account connected: \"%s\" (%s)\n", username, purple_account_get_protocol_id(acct));
+
}
@@ -48,7 +53,19 @@ hangouts_close(PurpleConnection *gc)
static GList *
hangouts_status_types(PurpleAccount *acct)
{
- return NULL;
+ purple_debug_info("hangouts-prpl", "returning status types for %s:\n",
+ purple_account_get_username(acct));
+ PurpleStatusType *type;
+
+ GList *types = NULL;
+
+ type = purple_status_type_new(PURPLE_STATUS_AVAILABLE,NULL,NULL,FALSE);
+ types = g_list_prepend(types, type);
+
+ type = purple_status_type_new(PURPLE_STATUS_OFFLINE,NULL, NULL, FALSE);
+ types = g_list_prepend(types, type);
+
+ return types;
}
static const char *
More information about the Commits
mailing list