"Initial commit to Gerrit"
[profile/ivi/gpsd.git] / libgpsmm.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--
3 This file is Copyright (c) 2010 by the GPSD project
4 BSD terms apply: see the file COPYING in the distribution root for details.
5 -->
6 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
7                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
8 <refentry>
9 <refentryinfo><date>13 May 2005</date></refentryinfo>
10 <refmeta>
11 <refentrytitle>libgpsmm</refentrytitle>
12 <manvolnum>3</manvolnum>
13 <refmiscinfo class="source">The GPSD Project</refmiscinfo>
14 <refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
15 </refmeta>
16 <refnamediv id='name'>
17 <refname>libgpsmm</refname>
18 <refname>libQgpsmm</refname>
19 <refpurpose>C++ and QT class wrapper for the GPS daemon</refpurpose>
20 </refnamediv>
21 <refsynopsisdiv id='synopsis'>
22 <funcsynopsis>
23 <funcsynopsisinfo>
24
25 C++:
26
27 #include &lt;libgpsmm&gt;
28
29 </funcsynopsisinfo>
30 <funcprototype>
31 <funcdef>struct gps_data_t *<function>open</function></funcdef>
32     <paramdef>char *<parameter>host</parameter></paramdef>
33     <paramdef>char *<parameter>port</parameter></paramdef>
34 </funcprototype>
35 <funcprototype>
36 <funcdef>struct gps_data_t *<function>open</function></funcdef>
37     <paramdef>void</paramdef>
38 </funcprototype>
39 <funcprototype>
40 <funcdef>struct gps_data_t *<function>query</function></funcdef>
41     <paramdef>char *<parameter>request</parameter></paramdef>
42 </funcprototype>
43 <funcprototype>
44 <funcdef>struct gps_data_t *<function>poll</function></funcdef>
45     <paramdef>void</paramdef>
46 </funcprototype>
47 <funcprototype>
48 <funcdef>int <function>set_callback</function></funcdef>
49     <paramdef>void (*<parameter>hook</parameter>)(struct gps_data_t *sentence, char *buf)</paramdef>
50 </funcprototype>
51 <funcprototype>
52 <funcdef>int <function>del_callback</function></funcdef>
53     <paramdef>void</paramdef>
54 </funcprototype>
55 <funcprototype>
56 <funcdef>struct gps_data_t *<function>stream</function></funcdef>
57     <paramdef>unsigned int<parameter>flags</parameter></paramdef>
58 </funcprototype>
59 </funcsynopsis>
60 </refsynopsisdiv>
61
62 <refsect1 id='description'><title>DESCRIPTION</title>
63
64 <para><emphasis remap='B'>libgpsmm and libQgpsmm</emphasis> are mere wrappers over
65         <emphasis remap='B'>libgps</emphasis>. The important difference between the libraries is that libgpsmm is targeted at C++ applications and contained in <emphasis remap='B'>libgps</emphasis>, while libQgpsmm is platform independant by using QTcpSocket to connect to <emphasis remap='B'>gpsd</emphasis> and shipped as an additional library due to the necessary linking to QT.
66 Method names are the same as
67 the analogue C functions. For a detailed description of the functions
68 please read
69 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
70 <function>open()</function> must be called after class constructor and before any other method
71 (<function>open()</function> is not inside the constructor since it may fail, however constructors have no return value).
72 The analogue of the C function <function>gps_close()</function> is in the destructor.</para>
73 </refsect1>
74
75 <refsect1 id='see_also'><title>SEE ALSO</title>
76 <para>
77 <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
78 <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
79 <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
80 </para>
81 </refsect1>
82
83 <refsect1 id='author'><title>AUTHOR</title>
84 <para>Alfredo Pironti &lt;alfredio@users.sourceforge.net&gt;.</para>
85 </refsect1>
86 </refentry>
87