gpsbt.h

00001 /*
00002 GPS BT management API. The API is used by those applications that
00003 wish to use services provided by gps daemon i.e., they wish to receive
00004 GPS data from the daemon. See README file for more details.
00005 
00006 Copyright (C) 2006 Nokia Corporation. All rights reserved.
00007 
00008 Author: Jukka Rissanen <jukka.rissanen@nokia.com>
00009 
00010 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00011 
00012 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
00013 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
00014 The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
00015 
00016 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00017 
00018 */
00019 
00020 /* $Id:$ */
00021 
00022 #include <stdlib.h>
00023 #include <stdio.h>
00024 #include <sys/types.h>
00025 #include <signal.h>
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 #include <gpsmgr.h>
00032 
00033 #ifndef gpsbt_included
00034 #define gpsbt_included
00035 
00036 /* Internal context information */
00037 typedef struct {
00038         gpsmgr_t mgr;
00039         char **rfcomms; /* what devices where found (null terminated array),
00040                          * not used if compiled with USE_AUTOMATIC_DISCONNECT
00041                          * (see gpsbt.c for details)
00042                          */
00043         int timeout; /* timeout for dbus messages */
00044 } gpsbt_t;
00045 
00046 
00136 extern int gpsbt_start(char *bda,
00137                        int debug_level,
00138                        int gpsd_debug_level,
00139                        short port,
00140                        char *error_buf,
00141                        int error_buf_max_len,
00142                        int timeout_ms,
00143                        gpsbt_t *ctx);
00144 
00145 
00156 extern int gpsbt_stop(gpsbt_t *ctx);
00157 
00158 
00167 extern int gpsbt_set_debug_level(int level);
00168 
00169 
00178 extern int gpsbt_init_pairing(char *bda);
00179 
00182 #endif /* gpsbt_included */
00183 
00184 #ifdef __cplusplus
00185 }
00186 #endif
00187 

Generated on Thu Oct 4 12:58:01 2007 for libgpsbt by  doxygen 1.4.6