diff options
author | Joe Barnett <jbarnett@stanfordalumni.org> | 2012-04-09 10:39:59 -0700 |
---|---|---|
committer | Joe Barnett <jbarnett@stanfordalumni.org> | 2012-04-09 10:39:59 -0700 |
commit | 926a46a89818ced86e6549aefce55252d0fb9612 (patch) | |
tree | c6c390599a38b541cff55f9bc571c1a5e80e20b2 | |
parent | 0de9412e9079b5499fd904d2c7cf528cf3b2880e (diff) |
cleanup
-rw-r--r-- | src/Makefile.in | 567 | ||||
-rw-r--r-- | src/kindling-connection.c~ | 330 | ||||
-rw-r--r-- | src/kindling-connection.h~ | 58 | ||||
-rw-r--r-- | src/kindling-protocol.c~ | 152 |
4 files changed, 0 insertions, 1107 deletions
diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index ac4e8f2..0000000 --- a/src/Makefile.in +++ /dev/null @@ -1,567 +0,0 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = telepathy_kindling$(EXEEXT) -subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_telepathy_kindling_OBJECTS = main.$(OBJEXT) \ - kindling-connection-manager.$(OBJEXT) \ - kindling-protocol.$(OBJEXT) kindling-connection.$(OBJEXT) \ - kindling-muc-manager.$(OBJEXT) -telepathy_kindling_OBJECTS = $(am_telepathy_kindling_OBJECTS) -am__DEPENDENCIES_1 = -telepathy_kindling_DEPENDENCIES = $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -telepathy_kindling_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(telepathy_kindling_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(telepathy_kindling_SOURCES) -DIST_SOURCES = $(telepathy_kindling_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TELEPATHY_KINDLING_CFLAGS = @TELEPATHY_KINDLING_CFLAGS@ -TELEPATHY_KINDLING_LIBS = @TELEPATHY_KINDLING_LIBS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = \ - -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \ - -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ - -DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \ - $(TELEPATHY_KINDLING_CFLAGS) - -AM_CFLAGS = \ - -Wall\ - -g - -telepathy_kindling_SOURCES = \ - main.c \ - kindling-connection-manager.h \ - kindling-connection-manager.c \ - kindling-protocol.c \ - kindling-protocol.h \ - kindling-connection.c \ - kindling-connection.h \ - kindling-muc-manager.c \ - kindling-muc-manager.h - -telepathy_kindling_LDFLAGS = \ - -Wl,--export-dynamic - -telepathy_kindling_LDADD = $(TELEPATHY_KINDLING_LIBS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -telepathy_kindling$(EXEEXT): $(telepathy_kindling_OBJECTS) $(telepathy_kindling_DEPENDENCIES) $(EXTRA_telepathy_kindling_DEPENDENCIES) - @rm -f telepathy_kindling$(EXEEXT) - $(AM_V_CCLD)$(telepathy_kindling_LINK) $(telepathy_kindling_OBJECTS) $(telepathy_kindling_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kindling-connection-manager.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kindling-connection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kindling-muc-manager.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kindling-protocol.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/kindling-connection.c~ b/src/kindling-connection.c~ deleted file mode 100644 index 00d4f73..0000000 --- a/src/kindling-connection.c~ +++ /dev/null @@ -1,330 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * telepathy-kindling - * Copyright (C) Joe Barnett 2012 <jbarnett@taplop> - * -telepathy-kindling is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * telepathy-kindling is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>."; - */ -#include "kindling-connection.h" -#include "kindling-muc-manager.h" -#include <telepathy-glib/interfaces.h> -#include <telepathy-glib/handle-repo-dynamic.h> -#include <telepathy-glib/simple-password-manager.h> -#include <telepathy-glib/telepathy-glib.h> -#include <libsoup/soup.h> -#include <json-glib/json-glib.h> - -G_DEFINE_TYPE (KindlingConnection, kindling_connection, TP_TYPE_BASE_CONNECTION); - -static const gchar * interfaces_always_present[] = { - TP_IFACE_CONNECTION_INTERFACE_ALIASING, - TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO, - TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, - NULL}; - -const gchar * const *kindling_connection_get_implemented_interfaces (void) { - /* we don't have any conditionally-implemented interfaces yet */ - return interfaces_always_present; -} - -enum { - PROP_SERVER = 1, - PROP_USERNAME, - PROP_PASSWORD, - LAST_PROPERTY_ENUM -}; - -typedef struct _KindlingConnectionPrivate KindlingConnectionPrivate; -struct _KindlingConnectionPrivate { - char *server; - char *username; - char *password; - char *api_token; - - //for actual auth - TpSimplePasswordManager *password_manager; - SoupSession *soup_session; - gulong soup_auth_cb_handle; -}; - -#define KINDLING_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), KINDLING_TYPE_CONNECTION, KindlingConnectionPrivate)) - -static void kindling_connection_set_property(GObject *obj, guint prop_id, const GValue *value, GParamSpec *pspec) { - g_printf("connection set prop %d\n", prop_id); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(obj); - switch (prop_id) { - case PROP_SERVER: - g_free(priv->server); - priv->server = g_value_dup_string(value); - break; - case PROP_USERNAME: - g_free(priv->username); - priv->username = g_value_dup_string(value); - break; - case PROP_PASSWORD: - g_free(priv->password); - priv->password = g_value_dup_string(value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, prop_id, pspec); - break; - } -} - -static void kindling_connection_get_property(GObject *obj, guint prop_id, GValue *value, GParamSpec *pspec) { - g_printf("connection get prop %d\n", prop_id); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(obj); - switch (prop_id) { - case PROP_SERVER: - g_value_set_string(value, priv->server); - break; - case PROP_USERNAME: - g_value_set_string(value, priv->username); - break; - case PROP_PASSWORD: - g_value_set_string(value, priv->password); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, prop_id, pspec); - break; - } - -} - -static void -kindling_connection_init (KindlingConnection *kindling_connection) { - g_printf("connection init\n"); -} - -static void _soup_authenticate_cb(SoupSession *session, - SoupMessage *msg, - SoupAuth *auth, - gboolean retrying, - gpointer user_data) { - g_printf("soup authenitcate\n"); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(user_data); - if (!retrying) { - soup_auth_authenticate(auth, priv->username, priv->password); - } - -} - -static void kindling_connection_constructed (GObject *object) { - g_printf("connection constructed\n"); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(object); - priv->soup_session = soup_session_async_new(); - - priv->soup_auth_cb_handle = g_signal_connect(priv->soup_session, - "authenticate", - _soup_authenticate_cb, - object); - /* TODO: Add initialization code here */ -} - -static void -kindling_connection_finalize (GObject *object) { - /* TODO: Add deinitalization code here */ - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(object); - g_free(priv->server); - g_free(priv->username); - g_free(priv->password); - g_free(priv->api_token); - - g_signal_handler_disconnect(priv->soup_session, priv->soup_auth_cb_handle); - g_object_unref(priv->soup_session); - g_printf("finalize kindling connection object\n"); - G_OBJECT_CLASS (kindling_connection_parent_class)->finalize (object); -} - - -static void _iface_create_handle_repos(TpBaseConnection *self, TpHandleRepoIface **repos) { - g_printf("connection create handle repos\n"); - int i; - for (i = 0; i < NUM_TP_HANDLE_TYPES; i++) { - repos[i] = NULL; - } - repos[TP_HANDLE_TYPE_CONTACT] = (TpHandleRepoIface *) g_object_new(TP_TYPE_DYNAMIC_HANDLE_REPO, - "handle-type", TP_HANDLE_TYPE_CONTACT, - NULL); - repos[TP_HANDLE_TYPE_ROOM] = (TpHandleRepoIface *) g_object_new(TP_TYPE_DYNAMIC_HANDLE_REPO, - "handle-type", TP_HANDLE_TYPE_ROOM, - NULL); -} - -static GPtrArray *_iface_create_channel_managers(TpBaseConnection *self) { - g_printf("connection create chan manager\n"); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(self); - GPtrArray *managers = g_ptr_array_sized_new (1); - g_ptr_array_add (managers, g_object_new (KINDLING_TYPE_MUC_MANAGER, - // "connection", self, - NULL)); - priv->password_manager = tp_simple_password_manager_new(self); - g_ptr_array_add(managers, priv->password_manager); - return managers; -} - -static void _connection_disconnect_with_gerror(KindlingConnection *conn, TpConnectionStatusReason reason, const gchar *key, const GError *error) { - g_printf("disconnect w/ error\n"); - GHashTable *details = tp_asv_new(key, G_TYPE_STRING, error->message, NULL); - - tp_base_connection_disconnect_with_dbus_error(TP_BASE_CONNECTION(conn), - tp_error_get_dbus_name(error->code), - details, - reason); - g_hash_table_unref(details); -} -static void -_soup_get_user_cb (SoupSession *session, SoupMessage *msg, gpointer user_data) { - g_printf("got user req soup callback %d : %s\n", msg->status_code , msg->response_body->data); - KindlingConnection *conn = KINDLING_CONNECTION(user_data); - TpBaseConnection *base_conn = TP_BASE_CONNECTION(conn); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(conn); - JsonParser *parser = json_parser_new(); - GError *error = NULL; - json_parser_load_from_data(parser, msg->response_body->data, -1, &error); - if (error != NULL) { - g_printf("error %s", error->message); - if (base_conn->status != TP_CONNECTION_STATUS_DISCONNECTED) { - _connection_disconnect_with_gerror(conn, - TP_CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED, - "debug-message", - error); - } - g_error_free(error); - g_object_unref (parser); - return; - } - JsonReader *reader = json_reader_new(json_parser_get_root (parser)); - json_reader_read_member (reader, "user"); - json_reader_read_member (reader, "api_auth_token"); - g_free(priv->api_token); - priv->api_token = g_strdup(json_reader_get_string_value(reader)); - g_object_unref (reader); - g_object_unref (parser); - - if (priv->api_token == NULL) { - if (base_conn->status != TP_CONNECTION_STATUS_DISCONNECTED) { - GError *error = g_error_new_literal(TP_ERRORS, 1, "no api token"); - - _connection_disconnect_with_gerror(conn, - TP_CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED, - "debug-message", - error); - g_error_free(error); - - } - } - - tp_base_connection_change_status (base_conn, TP_CONNECTION_STATUS_CONNECTED, TP_CONNECTION_STATUS_REASON_REQUESTED); -} - -static void _start_connecting_continue(KindlingConnection *self) { - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(self); - g_printf("continue connecting to %s with user name %s\n", priv->server, priv->username); - - - gchar *message = g_strdup_printf("https://%s.campfirenow.com/users/me.json", priv->server); - g_printf("continue connecting to %s\n", message); - SoupMessage *msg = soup_message_new("GET", message); - g_free(message); - //tp_base_connection_change_status (TP_BASE_CONNECTION(self), TP_CONNECTION_STATUS_CONNECTED, TP_CONNECTION_STATUS_REASON_REQUESTED); - soup_session_queue_message(priv->soup_session, msg, _soup_get_user_cb, self); -} - -static void _password_prompt_cb (GObject *source, GAsyncResult *result, gpointer user_data) { - g_printf("prompt cb\n"); - KindlingConnection *conn = KINDLING_CONNECTION(user_data); - TpBaseConnection *base_conn = TP_BASE_CONNECTION(conn); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(conn); - const GString *password; - GError *error = NULL; - - password = tp_simple_password_manager_prompt_finish (TP_SIMPLE_PASSWORD_MANAGER(source), - result, &error); - if (error != NULL) { - g_printf("error %s", error->message); - if (base_conn->status != TP_CONNECTION_STATUS_DISCONNECTED) { - _connection_disconnect_with_gerror(conn, - TP_CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED, - "debug-message", - error); - } - g_error_free(error); - return; - } - - g_free(priv->password); - priv->password = g_strdup(password->str); - - _start_connecting_continue(conn); -} - -static gboolean _iface_start_connecting(TpBaseConnection *self, GError **error) { - g_printf("connection connect \n"); - KindlingConnectionPrivate *priv = KINDLING_CONNECTION_GET_PRIVATE(self); - TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (self, TP_HANDLE_TYPE_CONTACT); - self->self_handle = tp_handle_ensure(contact_handles, priv->username, NULL, error); - if (!self->self_handle) { - return FALSE; - } - tp_base_connection_change_status(self, TP_CONNECTION_STATUS_CONNECTING, - TP_CONNECTION_STATUS_REASON_REQUESTED); - - - tp_simple_password_manager_prompt_async (priv->password_manager, - _password_prompt_cb, self); - return TRUE; -} - -static void _iface_shut_down(TpBaseConnection *self) { - g_printf("connection shut down\n"); -} - -static void _print_status_cb (TpBaseConnection *self) { - g_printf("Status is : %d\n", self->status); -} - -static void -kindling_connection_class_init (KindlingConnectionClass *klass) -{ - GParamSpec *param_spec; - g_printf("inited kindling connection class\n"); - GObjectClass* object_class = G_OBJECT_CLASS (klass); - TpBaseConnectionClass* parent_class = TP_BASE_CONNECTION_CLASS (klass); - - g_type_class_add_private (klass, sizeof(KindlingConnectionPrivate)); - object_class->set_property = kindling_connection_set_property; - object_class->get_property = kindling_connection_get_property; - object_class->constructed = kindling_connection_constructed; - object_class->finalize = kindling_connection_finalize; - object_class->dispose = kindling_connection_dispose; - - parent_class->create_handle_repos = _iface_create_handle_repos; - parent_class->create_channel_managers = _iface_create_channel_managers; - parent_class->start_connecting = _iface_start_connecting; - parent_class->shut_down = _iface_shut_down; - parent_class->interfaces_always_present = interfaces_always_present; - parent_class->connecting = _print_status_cb; - parent_class->connected = _print_status_cb; - parent_class->disconnected = _print_status_cb; - - param_spec = g_param_spec_string ("server", "server", "campfire server to connect to",NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_SERVER, param_spec); - param_spec = g_param_spec_string ("username", "username", "campfire user to auth with",NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_USERNAME, param_spec); - param_spec = g_param_spec_string ("password", "password", "campfire password to auth with",NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_PASSWORD, param_spec); -} - diff --git a/src/kindling-connection.h~ b/src/kindling-connection.h~ deleted file mode 100644 index 3331211..0000000 --- a/src/kindling-connection.h~ +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * telepathy-kindling - * Copyright (C) Joe Barnett 2012 <jbarnett@taplop> - * -telepathy-kindling is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * telepathy-kindling is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>."; - */ - -#ifndef _KINDLING_CONNECTION_H_ -#define _KINDLING_CONNECTION_H_ - -#include <glib-object.h> -#include <telepathy-glib/base-protocol.h> -#include <libsoup/soup.h> - -G_BEGIN_DECLS - -#define KINDLING_TYPE_CONNECTION (kindling_connection_get_type ()) -#define KINDLING_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), KINDLING_TYPE_CONNECTION, KindlingConnection)) -#define KINDLING_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), KINDLING_TYPE_CONNECTION, KindlingConnectionClass)) -#define KINDLING_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KINDLING_TYPE_CONNECTION)) -#define KINDLING_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), KINDLING_TYPE_CONNECTION)) -#define KINDLING_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), KINDLING_TYPE_CONNECTION, KindlingConnectionClass)) - -typedef struct _KindlingConnectionClass KindlingConnectionClass; -typedef struct _KindlingConnection KindlingConnection; - - - -struct _KindlingConnectionClass -{ - TpBaseConnectionClass parent_class; -}; - -struct _KindlingConnection -{ - TpBaseConnection parent_instance; - - -}; - -GType kindling_connection_get_type (void) G_GNUC_CONST; -const gchar * const *kindling_connection_get_implemented_interfaces (void); - -G_END_DECLS - -#endif /* _KINDLING_CONNECTION_H_ */ diff --git a/src/kindling-protocol.c~ b/src/kindling-protocol.c~ deleted file mode 100644 index d495c09..0000000 --- a/src/kindling-protocol.c~ +++ /dev/null @@ -1,152 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * telepathy-kindling - * Copyright (C) Joe Barnett 2012 <jbarnett@taplop> - * -telepathy-kindling is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * telepathy-kindling is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>."; - */ -#include "kindling-protocol.h" -#include "kindling-connection.h" -#include "kindling-muc-manager.h" - - -#include <dbus/dbus-glib.h> -#include <dbus/dbus-protocol.h> -#include <telepathy-glib/base-connection-manager.h> -#include <telepathy-glib/telepathy-glib.h> - -#define ICON_NAME "im-irc" -#define ENGLISH_NAME "Campfire" -#define VCARD_FIELD_NAME "x-" CAMPFIRE_PROTOCOL_NAME - - -G_DEFINE_TYPE (KindlingProtocol, kindling_protocol, TP_TYPE_BASE_PROTOCOL); - -static void -kindling_protocol_init (KindlingProtocol *kindling_protocol) -{ - - g_printf("inited kindling protocol\n"); - - /* TODO: Add initialization code here */ -} - -static void -kindling_protocol_finalize (GObject *object) -{ - /* TODO: Add deinitalization code here */ - g_printf("finalize kindling protocol object\n"); - - G_OBJECT_CLASS (kindling_protocol_parent_class)->finalize (object); -} - -static const TpCMParamSpec kindling_params[] = { - {"server", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_REQUIRED, NULL, 0, NULL, NULL, (gpointer)"server", NULL}, - {"username", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_REQUIRED, NULL, 0, NULL, NULL, (gpointer)"username", NULL}, - {"password", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_SECRET, NULL, 0, NULL, NULL, (gpointer)"password", NULL}, - {NULL,NULL,0,0,NULL,0} -}; - -static const TpCMParamSpec * get_parameters(TpBaseProtocol *self) { - g_printf("protocol get parameters\n"); - return kindling_params; -} - -static TpBaseConnection * -new_connection (TpBaseProtocol *protocol, GHashTable *params, GError **error) { - g_printf("protocol get new connection %s\n", tp_asv_get_string(params, "abc")); - return g_object_new (KINDLING_TYPE_CONNECTION, - "protocol", CAMPFIRE_PROTOCOL_NAME, - "server", tp_asv_get_string(params, "server"), - "username", tp_asv_get_string(params, "username"), - "password", tp_asv_get_string(params, "password"), - NULL); -} - -static void get_connection_details(TpBaseProtocol *self, - GStrv *connection_interfaces, - GType **channel_managers, - gchar **icon_name, - char **english_name, - gchar **vcard_field) { - g_printf("called get details\n"); - if (connection_interfaces != NULL) { - *connection_interfaces = g_strdupv((GStrv) kindling_connection_get_implemented_interfaces()); - } - if (channel_managers != NULL) { - GType types[] = { - KINDLING_TYPE_MUC_MANAGER, - G_TYPE_INVALID }; - *channel_managers = g_memdup(types, sizeof(types)); - } - if (icon_name != NULL) { - *icon_name = g_strdup (ICON_NAME); - } - if (vcard_field != NULL) { - *vcard_field = g_strdup (VCARD_FIELD_NAME); - } - if (english_name != NULL) { - *english_name = g_strdup (ENGLISH_NAME); - } - -} - -static GStrv -dup_authentication_types (TpBaseProtocol *base) { - g_printf("duping auth types\n"); - const gchar * const types [] = { - TP_IFACE_CHANNEL_INTERFACE_SASL_AUTHENTICATION, NULL, }; - return g_strdupv((GStrv)types); -} - -static gchar *normalize_contact(TpBaseProtocol *self, const gchar *contact, GError **error) { - g_printf("normalizing contact\n"); - return g_strdupv(contact); -} - -static char *identify_account(TpBaseProtocol *self, GHashTable *asv, GError **error) { - g_printf("identing account\n"); - gchar *nick = g_strdupv(tp_asv_get_string(asv, "username")); - gchar *server = g_strdupv(tp_asv_get_string(asv, "server")); - gchar *nick_at_server = g_strdup_printf("%s@%s", nick, server); - g_free(server); - g_free(nick); - return nick_at_server; -} - -static GStrv -get_interfaces (TpBaseProtocol *self) -{ - g_printf("get interfaces\n"); - return g_new0 (gchar *, 1); -} - - -static void -kindling_protocol_class_init (KindlingProtocolClass *klass) -{ - g_printf("inited kindling protocol class\n"); - GObjectClass* object_class = G_OBJECT_CLASS (klass); - TpBaseProtocolClass* parent_class = TP_BASE_PROTOCOL_CLASS (klass); - parent_class->new_connection = new_connection; - parent_class->get_parameters = get_parameters; - parent_class->get_connection_details = get_connection_details; - parent_class->normalize_contact = normalize_contact; - parent_class->identify_account = identify_account; - parent_class->dup_authentication_types = dup_authentication_types; - parent_class->get_interfaces = get_interfaces; - - object_class->finalize = kindling_protocol_finalize; -} - |