Easemob Windows SDK
emimagemessagebody.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 // EMImageMessageBody.h
14 //
15 // Copyright (c) 2015 EaseMob Inc. All rights reserved.
16 //
17 
18 #ifndef __easemob__EMImageMessageBody__
19 #define __easemob__EMImageMessageBody__
20 
21 #include "emfilemessagebody.h"
22 
23 #include <string>
24 
25 namespace easemob {
26 
27 class EASEMOB_API EMImageMessageBody : public EMFileMessageBody
28 {
29 public:
30 
31  struct Size
32  {
33  Size(double width = 0.0, double height = 0.0) : mWidth(width), mHeight(height){}
34  double mWidth;
35  double mHeight;
36  };
37 
45 
53  EMImageMessageBody(const std::string &localPath, const std::string &thumbnailLocalPath);
54 
61  virtual ~EMImageMessageBody();
62 
69  void setThumbnailDisplayName(const std::string &);
70 
77  const std::string& thumbnailDisplayName() const;
78 
85  void setThumbnailLocalPath(const std::string &);
86 
93  const std::string& thumbnailLocalPath() const;
94 
102  void setThumbnailRemotePath(const std::string &);
103 
110  const std::string& thumbnailRemotePath() const;
111 
119  void setThumbnailSecretKey(const std::string &);
120 
127  const std::string& thumbnailSecretKey() const;
128 
135  void setThumbnailSize(const Size &);
136 
143  const Size& thumbnailSize() const;
144 
152  void setThumbnailFileLength(int64_t);
153 
160  int64_t thumbnailFileLength() const;
161 
169  void setThumbnailDownloadStatus(EMDownloadStatus);
170 
177  EMDownloadStatus thumbnailDownloadStatus() const;
178 
185  void setSize(const Size &);
186 
193  const Size& size() const;
194 private:
201  void init();
202 
203 private:
205  EMImageMessageBody& operator=(const EMImageMessageBody&);
206  //Thumbnail
207  std::string mThumbnailDisplayName;
208  std::string mThumbnailLocalPath;
209  std::string mThumbnailRemotePath;
210  std::string mThumbnailSecretKey;
211  Size mThumbnailSize;
212  int64_t mThumbnailFileLength;
213  EMDownloadStatus mThumbnailDownloadStatus;
214 
215  //Image size
216  Size mSize;
217 };
218 
219 typedef std::shared_ptr<EMImageMessageBody> EMImageMessageBodyPtr;
220 
221 }
222 
223 #endif /* defined(__easemob__EMImageMessageBody__) */
Definition: emfilemessagebody.h:26
Definition: emattributevalue.h:28
EMDownloadStatus
Definition: emfilemessagebody.h:33
Definition: emimagemessagebody.h:27
Definition: emimagemessagebody.h:31