Easemob Windows SDK
emlocationmessagebody.h
1 /************************************************************
2  * * EaseMob CONFIDENTIAL
3  * __________________
4  * Copyright (C) 2015 EaseMob Technologies. All rights reserved.
5  *
6  * NOTICE: All information contained herein is, and remains
7  * the property of EaseMob Technologies.
8  * Dissemination of this information or reproduction of this material
9  * is strictly forbidden unless prior written permission is obtained
10  * from EaseMob Technologies.
11  */
12 //
13 // EMLocationMessageBody.h
14 //
15 // Copyright (c) 2015 EaseMob Inc. All rights reserved.
16 //
17 
18 #ifndef __easemob__EMLocationMessageBody__
19 #define __easemob__EMLocationMessageBody__
20 
21 #include <string>
22 #include "emmessagebody.h"
23 
24 namespace easemob {
25 
26 class EASEMOB_API EMLocationMessageBody : public EMMessageBody
27 {
28 public:
29 
30  #define INVALID_LAT_LONG -999.0
31 
40  EMLocationMessageBody(const double &latitude, const double &longitude, const std::string &address = "");
41 
49 
56  double latitude() const;
57 
64  double longitude() const;
65 
72  const std::string& address() const;
73 
80  void setLatitude(double);
81 
88  void setLongitude(double);
89 
96  void setAddress(const std::string &);
97 
98 private:
105  void init();
106 
114 
115 private:
117  EMLocationMessageBody& operator=(const EMLocationMessageBody&);
118  virtual void dummy() const{}
119  double mLatitude;
120  double mLongitude;
121  std::string mAddress;
122  friend class EMMessageEncoder;
123  friend class EMLocationMessageBodyPrivate;
124 };
125 
126 typedef std::shared_ptr<EMLocationMessageBody> EMLocationMessageBodyPtr;
127 
128 }
129 
130 #endif /* defined(__easemob__EMLocationMessageBody__) */
Definition: emlocationmessagebody.h:26
Definition: emmessagebody.h:31
Definition: emattributevalue.h:28
virtual ~EMLocationMessageBody()
Class destructor.
Definition: emlocationmessagebody.h:48