Author: nevans Date: 2008-03-03 14:54:39 -0700 (Mon, 03 Mar 2008) New Revision: 6531
Modified: gnunet-gtk/src/plugins/chat/Makefile gnunet-gtk/src/plugins/chat/chat.c Log: Modified: gnunet-gtk/src/plugins/chat/Makefile =================================================================== --- gnunet-gtk/src/plugins/chat/Makefile 2008-03-03 21:42:26 UTC (rev 6530) +++ gnunet-gtk/src/plugins/chat/Makefile 2008-03-03 21:54:39 UTC (rev 6531) @@ -77,23 +77,23 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /home/grothoff/svn/gnunet-gtk/missing --run aclocal-1.8 +ACLOCAL = ${SHELL} /root/gnunet-gtk/missing --run aclocal-1.8 AMDEP_FALSE = # AMDEP_TRUE = -AMTAR = ${SHELL} /home/grothoff/svn/gnunet-gtk/missing --run tar +AMTAR = ${SHELL} /root/gnunet-gtk/missing --run tar AR = ar AS = as -AUTOCONF = ${SHELL} /home/grothoff/svn/gnunet-gtk/missing --run autoconf -AUTOHEADER = ${SHELL} /home/grothoff/svn/gnunet-gtk/missing --run autoheader -AUTOMAKE = ${SHELL} /home/grothoff/svn/gnunet-gtk/missing --run automake-1.8 -AWK = mawk +AUTOCONF = ${SHELL} /root/gnunet-gtk/missing --run autoconf +AUTOHEADER = ${SHELL} /root/gnunet-gtk/missing --run autoheader +AUTOMAKE = ${SHELL} /root/gnunet-gtk/missing --run automake-1.8 +AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -fno-strict-aliasing -Wall -g -Wall -Werror -O0 +CFLAGS = -fno-strict-aliasing -Wall -g -O2 CONVENIENCE_LTDL_FALSE = CONVENIENCE_LTDL_TRUE = # CPP = gcc -E -CPPFLAGS = -I/home/grothoff/include -I/home/grothoff/include +CPPFLAGS = -I/root/GNUnetData//include CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 @@ -102,25 +102,24 @@ DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DLLTOOL = dlltool -DSYMUTIL = ECHO = echo ECHO_C = ECHO_N = -n ECHO_T = EGREP = /bin/grep -E EXEEXT = -F77 = f77 +F77 = gfortran FFLAGS = -g -O2 -GMSGFMT = /usr/bin/msgfmt +GMSGFMT = /usr/bin/gmsgfmt GNUNETGTK_CFLAGS = -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -GNUNETGTK_LIBS = -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +GNUNETGTK_LIBS = -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 GREP = /bin/grep GTK_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 HAVE_GTK_FALSE = # HAVE_GTK_TRUE = -HAVE_LIBGKSU2_FALSE = # -HAVE_LIBGKSU2_TRUE = +HAVE_LIBGKSU2_FALSE = +HAVE_LIBGKSU2_TRUE = # HAVE_LIBNOTIFY_FALSE = HAVE_LIBNOTIFY_TRUE = # INSTALL_DATA = ${INSTALL} -m 644 @@ -130,35 +129,34 @@ INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s INTLLIBS = -LDFLAGS = -L/home/grothoff/lib +LDFLAGS = -L/root/GNUnetData//lib LIBADD_DL = -ldl -LIBGKSU2_CFLAGS = -DORBIT2=1 -pthread -I/usr/include/libgksu -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/startup-notification-1.0 -I/usr/include/gnome-keyring-1 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -LIBGKSU2_LIBS = -pthread -lgksu2 -lstartup-notification-1 -lgnome-keyring -lgconf-2 -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0 +LIBGKSU2_CFLAGS = +LIBGKSU2_LIBS = LIBICONV = -liconv LIBINTL = LIBLTDL = -lltdl LIBNOTIFY_CFLAGS = LIBNOTIFY_LIBS = LIBOBJS = -LIBS = -lnsl +LIBS = -lm -lnsl LIBTOOL = $(SHELL) $(top_builddir)/libtool LN_S = ln -s LTDLINCL = LTLIBICONV = -liconv LTLIBINTL = LTLIBOBJS = -MAKEINFO = ${SHELL} /home/grothoff/svn/gnunet-gtk/missing --run makeinfo +MAKEINFO = ${SHELL} /root/gnunet-gtk/missing --run makeinfo MINGW_FALSE = MINGW_TRUE = # MKINSTALLDIRS = $(top_builddir)/./mkinstalldirs MSGFMT = /usr/bin/msgfmt MSGMERGE = /usr/bin/msgmerge -NMEDIT = OBJDUMP = objdump OBJEXT = o PACKAGE = gnunet-gtk PACKAGE_BUGREPORT = [EMAIL PROTECTED] -PACKAGE_DATA = /home/grothoff/share +PACKAGE_DATA = /root/GNUnetData//share PACKAGE_NAME = gnunet-gtk PACKAGE_STRING = gnunet-gtk 0.8.0pre0 PACKAGE_TARNAME = gnunet-gtk @@ -176,7 +174,7 @@ XGETTEXT = /usr/bin/xgettext ac_ct_CC = gcc ac_ct_CXX = g++ -ac_ct_F77 = f77 +ac_ct_F77 = gfortran am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__fastdepCXX_FALSE = # @@ -203,7 +201,7 @@ htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = /home/grothoff/svn/gnunet-gtk/install-sh +install_sh = /root/gnunet-gtk/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale @@ -212,7 +210,7 @@ mkdir_p = mkdir -p -- . oldincludedir = /usr/include pdfdir = ${docdir} -prefix = /home/grothoff +prefix = /root/GNUnetData/ program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin @@ -235,7 +233,7 @@ libgnunetgtkmodule_chat_la_LIBADD = \ $(top_builddir)/src/common/libgnunetgtk_common.la \ - -lgnunetutil -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 + -lgnunetutil -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 libgnunetgtkmodule_chat_la_LDFLAGS = \ -export-dynamic -avoid-version -module Modified: gnunet-gtk/src/plugins/chat/chat.c =================================================================== --- gnunet-gtk/src/plugins/chat/chat.c 2008-03-03 21:42:26 UTC (rev 6530) +++ gnunet-gtk/src/plugins/chat/chat.c 2008-03-03 21:54:39 UTC (rev 6531) @@ -134,106 +134,5 @@ return -1; } -/** - * Join a chat room. - * - * @param nickname the nick you want to use - * @param memberInfo public information about you - * @param callback which function to call if a message has - * been received? - * @param cls argument to callback - * @return NULL on error - */ -struct GNUNET_CHAT_Room * -GNUNET_CHAT_gui_join_room (const char *nickname, - const char *room_name, - const GNUNET_RSA_PublicKey * me, - const struct GNUNET_RSA_PrivateKey *key, - GNUNET_CHAT_MessageCallback callback, void *cls) -{ -#if 0 - CS_chat_JOIN_MESSAGE *join_msg; - GNUNET_MessageHeader csHdr; - GNUNET_HashCode hash_of_me; - GNUNET_HashCode hash_of_room_name; - - struct GNUNET_CHAT_Room *chat_room; - struct GNUNET_ClientServerConnection *sock; - - int size_of_join; - - csHdr.size = htons (sizeof (CS_chat_JOIN_MESSAGE)); - csHdr.type = htons (GNUNET_CS_PROTO_CHAT_JOIN_MSG); - - sock = GNUNET_client_connection_create (ectx, cfg); - - if (sock == NULL) - { - fprintf (stderr, _("Error establishing connection with gnunetd.\n")); - return NULL; - } - - // connect - GNUNET_hash (me, sizeof (GNUNET_RSA_PublicKey), &hash_of_me); - GNUNET_hash (room_name, strlen (room_name), &hash_of_room_name); - - size_of_join = - sizeof (CS_chat_JOIN_MESSAGE) + strlen (nickname) + - sizeof (GNUNET_RSA_PublicKey) + strlen (room_name); - join_msg = GNUNET_malloc (size_of_join); - - join_msg->nick_len = htons (strlen (nickname)); - join_msg->pubkey_len = htons (sizeof (GNUNET_RSA_PublicKey)); - //join_msg->room_name_len = htonl (strlen (room_name)); - - - memcpy (&join_msg->nick[0], nickname, strlen (nickname)); - memcpy (&join_msg->nick[strlen (nickname)], me, - sizeof (GNUNET_RSA_PublicKey)); - memcpy (&join_msg->nick[strlen (nickname) + sizeof (GNUNET_RSA_PublicKey)], - room_name, strlen (room_name)); - - join_msg->header = csHdr; - join_msg->header.size = htons (size_of_join); - - if (GNUNET_SYSERR == - GNUNET_client_connection_write (sock, &join_msg->header)) - { - /* ALREADY LOGGED */ - fprintf (stderr, _("Error writing to socket.\n")); - GNUNET_free (join_msg); - return NULL; - } - - GNUNET_free (join_msg); - - // allocate & init room struct - chat_room = GNUNET_malloc (sizeof (struct GNUNET_CHAT_Room)); - chat_room->nickname = GNUNET_malloc (strlen (nickname) + 1); - strncpy (chat_room->nickname, nickname, strlen (nickname) + 1); - - chat_room->room_name = GNUNET_malloc (strlen (room_name) + 1); - strncpy (chat_room->room_name, room_name, strlen (room_name) + 1); - - chat_room->room_name_hash = hash_of_room_name; - chat_room->my_public_key = me; - chat_room->my_public_key_hash = hash_of_me; - chat_room->my_private_key = key; - chat_room->callback = callback; - chat_room->callback_cls = cls; - chat_room->ectx = ectx; - chat_room->cfg = cfg; - chat_room->memberInfo = GNUNET_malloc (strlen (memberInfo) + 1); - strncpy (chat_room->memberInfo, memberInfo, strlen (memberInfo) + 1); - chat_room->sock = sock; - - // create pthread - chat_room->listen_thread = - GNUNET_thread_create (&poll_thread, chat_room, 1024 * 2); - - return chat_room; -#endif -} - /* end of chat.c */ _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn