[imbus commit] r52 - in trunk/imbus: . daemon src unittests

0 views
Skip to first unread message

codesite...@google.com

unread,
Sep 11, 2008, 1:48:24 AM9/11/08
to imbus...@googlegroups.com
Author: peterzhoulei
Date: Wed Sep 10 22:47:40 2008
New Revision: 52

Added:
trunk/imbus/daemon/
trunk/imbus/daemon/Makefile.am
trunk/imbus/daemon/main.c
trunk/imbus/src/im_debug.h
trunk/imbus/unittests/base_types_test.c
- copied unchanged from r50, /trunk/imbus/unittests/base_types.c
trunk/imbus/unittests/string_test.c
- copied unchanged from r50, /trunk/imbus/unittests/string.c
Removed:
trunk/imbus/unittests/base_types.c
trunk/imbus/unittests/string.c
Modified:
trunk/imbus/Makefile.am
trunk/imbus/configure.ac
trunk/imbus/src/Makefile.am
trunk/imbus/unittests/Makefile.am

Log:
1. add a debug class for convenience; 2. start the imbus daemon
implementation

Modified: trunk/imbus/Makefile.am
==============================================================================
--- trunk/imbus/Makefile.am (original)
+++ trunk/imbus/Makefile.am Wed Sep 10 22:47:40 2008
@@ -36,7 +36,7 @@
endif

AUTOMAKE_OPTIONS = gnu
-SUBDIRS = $(LIBLTDL_DIR) src tests utils $(UNIT_TESTS_DIR)
+SUBDIRS = $(LIBLTDL_DIR) src tests utils daemon $(UNIT_TESTS_DIR)

MAINTAINERCLEANFILES = Makefile.in \
aclocal.m4 \

Modified: trunk/imbus/configure.ac
==============================================================================
--- trunk/imbus/configure.ac (original)
+++ trunk/imbus/configure.ac Wed Sep 10 22:47:40 2008
@@ -255,6 +255,7 @@
tests/Makefile
utils/Makefile
unittests/Makefile
+ daemon/Makefile
imbus-1.0.pc])
AC_OUTPUT


Added: trunk/imbus/daemon/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/imbus/daemon/Makefile.am Wed Sep 10 22:47:40 2008
@@ -0,0 +1,11 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+INCLUDES = -I$(top_builddir) \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src
+
+bin_PROGRAMS = imbus-daemon
+
+imbus_daemon_SOURCES = main.c
+imbus_daemon_LDADD = $(top_builddir)/src/libimbus-1.0.la -lm

Added: trunk/imbus/daemon/main.c
==============================================================================
--- (empty file)
+++ trunk/imbus/daemon/main.c Wed Sep 10 22:47:40 2008
@@ -0,0 +1,37 @@
+#include <imbus.h>
+#include <im_debug.h>
+
+int create_io_loop()
+{
+ return 0;
+}
+
+int create_bus_channel()
+{
+ return 0;
+}
+
+int create_server()
+{
+ return 0;
+}
+
+int main ( int argc, char *argv [] )
+{
+ IMMainLoop *loop;
+ IMConnection *conn;
+ IMServer *server;
+ IMIOError error;
+
+ im_init ( &argc, &argv ); /* initialize imbus */
+
+ im_print_debug( "something is happenning here!" );
+ im_print_error( "something is wrong here!" );
+ im_print_warning( "something may cause error here!" );
+
+ create_io_loop();
+ create_bus_channel();
+ create_server();
+
+ return 0;
+}

Modified: trunk/imbus/src/Makefile.am
==============================================================================
--- trunk/imbus/src/Makefile.am (original)
+++ trunk/imbus/src/Makefile.am Wed Sep 10 22:47:40 2008
@@ -76,7 +76,8 @@
im_unicode.h \
im_utilities.h \
im_value.h \
- im_value_array.h
+ im_value_array.h \
+ im_debug.h

configexecincludedir = $(libdir)/imbus-1.0/include


Added: trunk/imbus/src/im_debug.h
==============================================================================
--- (empty file)
+++ trunk/imbus/src/im_debug.h Wed Sep 10 22:47:40 2008
@@ -0,0 +1,33 @@
+#ifndef __IM_DEBUG_H__
+#define __IM_DEBUG_H__
+
+#include "im_internals.h"
+
+/**
+ * @defgroup IMDebug
+ * @ingroup PrivateIMBus
+ * @{
+ */
+
+void im_print_debug( const IMChar* data )
+{
+#if IM_ENABLE_DEBUG
+ printf ("[IMBUS_DEBUG]: %s \n", data );
+#endif
+}
+
+void im_print_error( const IMChar* data )
+{
+ printf ("[IMBUS_ERROR]: %s \n", data );
+}
+
+void im_print_warning( const IMChar* data )
+{
+ printf ("[IMBUS_WARNING]: %s \n", data );
+}
+
+#endif
+/** @} */
+/*
+vi:ts=4:nowrap:ai:expandtab
+*/

Modified: trunk/imbus/unittests/Makefile.am
==============================================================================
--- trunk/imbus/unittests/Makefile.am (original)
+++ trunk/imbus/unittests/Makefile.am Wed Sep 10 22:47:40 2008
@@ -5,8 +5,8 @@
main.c \
memory_test.c \
utilities_test.c \
- base_types.c \
- string.c
+ base_types_test.c \
+ string_test.c


INCLUDES = -I$(top_builddir) \

Reply all
Reply to author
Forward
0 new messages