Easemob Windows SDK
emvideomessagebody.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 // EMVideoMessageBody.h
14 //
15 // Copyright (c) 2015 EaseMob Inc. All rights reserved.
16 //
17 
18 #ifndef __easemob__EMVideoMessageBody__
19 #define __easemob__EMVideoMessageBody__
20 
21 #include "emfilemessagebody.h"
22 
23 #include <string>
24 
25 namespace easemob {
26 
27 class EASEMOB_API EMVideoMessageBody : 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  EMVideoMessageBody(const std::string &localPath, const std::string &thumbnailLocalPath);
54 
61  virtual ~EMVideoMessageBody();
62 
69  void setThumbnailLocalPath(const std::string &);
70 
77  const std::string& thumbnailLocalPath() const;
78 
86  void setThumbnailRemotePath(const std::string &);
87 
94  const std::string& thumbnailRemotePath() const;
95 
103  void setThumbnailSecretKey(const std::string &);
104 
111  const std::string& thumbnailSecretKey() const;
112 
120  void setThumbnailDownloadStatus(EMDownloadStatus);
121 
128  EMDownloadStatus thumbnailDownloadStatus() const;
129 
136  void setSize(const Size &);
137 
144  const Size& size() const;
145 
152  int duration() const;
153 
160  void setDuration(int);
161 private:
168  void init();
169 
170 private:
172  EMVideoMessageBody& operator=(const EMVideoMessageBody&);
173  //Thumbnail
174  std::string mThumbnailLocalPath;
175  std::string mThumbnailRemotePath;
176  std::string mThumbnailSecretKey;
177  EMDownloadStatus mThumbnailDownloadStatus;
178 
179  //Video
180  Size mSize;
181  int mDuration;
182 };
183 typedef std::shared_ptr<EMVideoMessageBody> EMVideoMessageBodyPtr;
184 }
185 
186 #endif /* defined(__easemob__EMVideoMessageBody__) */
Definition: emvideomessagebody.h:31
Definition: emvideomessagebody.h:27
Definition: emfilemessagebody.h:26
Definition: emattributevalue.h:28
EMDownloadStatus
Definition: emfilemessagebody.h:33