phonemgr r277 - in trunk: . libgsm
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: phonemgr r277 - in trunk: . libgsm
- Date: Sat, 8 Mar 2008 15:40:46 +0000 (GMT)
Author: hadess
Date: Sat Mar 8 15:40:46 2008
New Revision: 277
URL: http://svn.gnome.org/viewvc/phonemgr?rev=277&view=rev
Log:
2008-03-08 Bastien Nocera <hadess hadess net>
* libgsm/Makefile.am:
* libgsm/test-sdp-search.c (main): Add a test program for
finding out the serial channel on a remote device
Added:
trunk/libgsm/test-sdp-search.c
Modified:
trunk/ChangeLog
trunk/libgsm/Makefile.am
Modified: trunk/libgsm/Makefile.am
==============================================================================
--- trunk/libgsm/Makefile.am (original)
+++ trunk/libgsm/Makefile.am Sat Mar 8 15:40:46 2008
@@ -8,7 +8,7 @@
phonemgr-marshal.list \
phones.xml
-noinst_PROGRAMS = glibgsmtest
+noinst_PROGRAMS = glibgsmtest test-sdp-search
noinst_LTLIBRARIES = libgsmwrap.la
@@ -23,6 +23,9 @@
glibgsmtest_SOURCES = glibgsmtest.c
glibgsmtest_LDADD = libgsmwrap.la
+test_sdp_search_SOURCES = test-sdp-search.c
+test_sdp_search_LDADD = libgsmwrap.la
+
phones_DATA = phones.xml
phonesdir = $(datadir)/$(PACKAGE)
Added: trunk/libgsm/test-sdp-search.c
==============================================================================
--- (empty file)
+++ trunk/libgsm/test-sdp-search.c Sat Mar 8 15:40:46 2008
@@ -0,0 +1,26 @@
+
+#include <glib.h>
+#include "phonemgr-utils.h"
+
+int main (int argc, char **argv)
+{
+ char *address;
+ int channel;
+
+ address = argv[1];
+ if (address == NULL) {
+ g_printerr ("Usage: %s [bdaddr]\n", argv[0]);
+ return 1;
+ }
+
+ channel = phonemgr_utils_get_serial_channel (address);
+ if (channel < 0) {
+ g_printerr ("Couldn't find channel for device '%s'\n", address);
+ return 1;
+ }
+
+ g_print ("Found channel %d for device '%s'\n", channel, address);
+
+ return 0;
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]