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-2007 Nokia Corporation. All rights reserved.
00007 
00008 Contact: 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 
00145 extern int gpsbt_start(char *bda,
00146                        int debug_level,
00147                        int gpsd_debug_level,
00148                        short port,
00149                        char *error_buf,
00150                        int error_buf_max_len,
00151                        int timeout_ms,
00152                        gpsbt_t *ctx);
00153 
00154 
00165 extern int gpsbt_stop(gpsbt_t *ctx);
00166 
00167 
00176 extern int gpsbt_set_debug_level(int level);
00177 
00178 
00187 extern int gpsbt_init_pairing(char *bda);
00188 
00191 #endif /* gpsbt_included */
00192 
00193 #ifdef __cplusplus
00194 }
00195 #endif
00196 

Generated on Sat Jun 14 12:34:29 2008 for libgpsbt by  doxygen 1.5.1