This file is indexed.

/usr/include/qgis/qgsgpsconnection.h is in libqgis-dev 1.7.4+1.7.5~20120320-1.1+b1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
/***************************************************************************
                          qgsgpsconnection.h  -  description
                          -------------------
    begin                : November 30th, 2009
    copyright            : (C) 2009 by Marco Hugentobler
    email                : marco at hugis dot net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef QGSGPSCONNECTION_H
#define QGSGPSCONNECTION_H

#include <QDateTime>
#include <QObject>

class QIODevice;

struct CORE_EXPORT QgsSatelliteInfo
{
  int id;
  bool inUse;
  int elevation;
  int azimuth;
  int signal;
};

struct CORE_EXPORT QgsGPSInformation
{
  double latitude;
  double longitude;
  double elevation;
  double speed; //in km/h
  double direction;
  QList<QgsSatelliteInfo> satellitesInView;
  double pdop;
  double hdop;
  double vdop;
  QDateTime utcDateTime;
};

/**Abstract base class for connection to a GPS device*/
class CORE_EXPORT QgsGPSConnection : public QObject
{
    Q_OBJECT
  public:

    enum Status
    {
      NotConnected,
      Connected,
      DataReceived,
      GPSDataReceived
    };

    /**Constructor
        @param dev input device for the connection (e.g. serial device). The class takes ownership of the object
        @param pollIntervall update intervall in milliseconds*/
    QgsGPSConnection( QIODevice* dev );
    virtual ~QgsGPSConnection();
    /**Opens connection to device*/
    bool connect();
    /**Closes connection to device*/
    bool close();

    /**Sets the GPS source. The class takes ownership of the device class*/
    void setSource( QIODevice* source );

    /**Returns the status. Possible state are not connected, connected, data received*/
    Status status() const { return mStatus; }

    /**Returns the current gps information (lat, lon, etc.)*/
    QgsGPSInformation currentGPSInformation() const { return mLastGPSInformation; }

  signals:
    void stateChanged( const QgsGPSInformation& info );

  protected:
    /**Data source (e.g. serial device, socket, file,...)*/
    QIODevice* mSource;
    /**Last state of the gps related variables (e.g. position, time, ...)*/
    QgsGPSInformation mLastGPSInformation;
    /**Connection status*/
    Status mStatus;

  private:
    /**Closes and deletes mSource*/
    void cleanupSource();
    void clearLastGPSInformation();

  protected slots:
    /**Parse available data source content*/
    virtual void parseData() = 0;
};

#endif // QGSGPSCONNECTION_H