1 <?xml version="1.0" encoding="ISO-8859-1"?>
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.
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">
9 <refentryinfo><date>13 May 2005</date></refentryinfo>
11 <refentrytitle>libgpsmm</refentrytitle>
12 <manvolnum>3</manvolnum>
13 <refmiscinfo class="source">The GPSD Project</refmiscinfo>
14 <refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
16 <refnamediv id='name'>
17 <refname>libgpsmm</refname>
18 <refname>libQgpsmm</refname>
19 <refpurpose>C++ and QT class wrapper for the GPS daemon</refpurpose>
21 <refsynopsisdiv id='synopsis'>
27 #include <libgpsmm>
31 <funcdef>struct gps_data_t *<function>open</function></funcdef>
32 <paramdef>char *<parameter>host</parameter></paramdef>
33 <paramdef>char *<parameter>port</parameter></paramdef>
36 <funcdef>struct gps_data_t *<function>open</function></funcdef>
37 <paramdef>void</paramdef>
40 <funcdef>struct gps_data_t *<function>query</function></funcdef>
41 <paramdef>char *<parameter>request</parameter></paramdef>
44 <funcdef>struct gps_data_t *<function>poll</function></funcdef>
45 <paramdef>void</paramdef>
48 <funcdef>int <function>set_callback</function></funcdef>
49 <paramdef>void (*<parameter>hook</parameter>)(struct gps_data_t *sentence, char *buf)</paramdef>
52 <funcdef>int <function>del_callback</function></funcdef>
53 <paramdef>void</paramdef>
56 <funcdef>struct gps_data_t *<function>stream</function></funcdef>
57 <paramdef>unsigned int<parameter>flags</parameter></paramdef>
62 <refsect1 id='description'><title>DESCRIPTION</title>
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
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>
75 <refsect1 id='see_also'><title>SEE ALSO</title>
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>.
83 <refsect1 id='author'><title>AUTHOR</title>
84 <para>Alfredo Pironti <alfredio@users.sourceforge.net>.</para>