Home · All Classes · All Namespaces · Modules · Functions · Files
location-info.h
1 
23 #ifndef _TelepathyQt_location_info_h_HEADER_GUARD_
24 #define _TelepathyQt_location_info_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/Global>
31 
32 #include <QDateTime>
33 #include <QSharedDataPointer>
34 #include <QString>
35 #include <QVariantMap>
36 
37 namespace Tp
38 {
39 
40 class TP_QT_EXPORT LocationInfo
41 {
42 public:
43  LocationInfo();
44  LocationInfo(const QVariantMap &location);
45  LocationInfo(const LocationInfo &other);
46  virtual ~LocationInfo();
47 
48  bool isValid() const { return mPriv.constData() != 0; }
49 
50  LocationInfo &operator=(const LocationInfo &other);
51 
52  QString countryCode() const;
53  QString country() const;
54  QString region() const;
55  QString locality() const;
56  QString area() const;
57  QString postalCode() const;
58  QString street() const;
59 
60  QString building() const;
61  QString floor() const;
62  QString room() const;
63  QString text() const;
64  QString description() const;
65  QString uri() const;
66 
67  QString language() const;
68 
69  double latitude() const;
70  double longitude() const;
71  double altitude() const;
72  double accuracy() const;
73 
74  double speed() const;
75  double bearing() const;
76 
77  QDateTime timestamp() const;
78 
79  QVariantMap allDetails() const;
80 
81 private:
82  friend class Contact;
83 
84  TP_QT_NO_EXPORT void updateData(const QVariantMap &location);
85 
86  struct Private;
87  friend struct Private;
88  QSharedDataPointer<Private> mPriv;
89 };
90 
91 } // Tp
92 
93 Q_DECLARE_METATYPE(Tp::LocationInfo);
94 
95 #endif
bool isValid() const
Definition: location-info.h:48
The LocationInfo class represents the location of a Telepathy Contact.
Definition: location-info.h:40
The Contact class represents a Telepathy contact.
Definition: contact.h:51
Definition: abstract-adaptor.cpp:31


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7