17 #ifndef emchatconfigs_h 18 #define emchatconfigs_h 22 #include "emcallback.h" 30 class EMChatPrivateConfigs;
50 EMChatConfigs(
const std::string &resourcePath,
const std::string &workPath,
const std::string &appkey,
unsigned int deviceId = 0);
53 void setUsingHttps(
bool usingHttps) { mIsUsingHttps = usingHttps;}
55 bool getUsingHttps() {
return mIsUsingHttps; }
57 void setUseEncryption(
bool useEncryption) { mUseEncryption = useEncryption; }
59 bool getUseEncryption() {
return mUseEncryption; }
61 void setSortMessageByServerTime(
bool sortByServerTime) { mSortByServerTime = sortByServerTime; }
63 bool getSortMessageByServerTime() {
return mSortByServerTime; }
65 void setNetCallback(
const EMNetCallbackPtr callback) {
66 mNetCallback = callback;
69 EMNetCallbackPtr getNetCallback() {
96 void setLogPath(
const std::string& path) { mLogPath = path; }
98 const std::string& getLogPath()
const {
return mLogPath; }
109 const std::string& getDownloadPath()
const {
return mDownloadPath; }
117 void setAppKey(
const std::string& appKey) { mAppKey = appKey; }
119 const std::string& getAppKey()
const {
return mAppKey; }
315 void setOs(
const OSType os) { mOs = os; }
331 void setOsVersion(
const std::string& version) { mOsVersion = version; }
384 void setLogLevel(EMLogLevel level);
386 EMChatPrivateConfigs& privateConfigs() {
return *mPrivateConfigs; }
388 void setDeleteMessageAsExitChatRoom(
bool b){mDeleteMessagesAsExitChatRoom = b;}
390 bool getDeleteMessageAsExitChatRoom(){
return mDeleteMessagesAsExitChatRoom;}
396 std::string mResourcePath;
397 std::string mWorkPath;
398 std::string mLogPath;
399 std::string mDownloadPath;
401 unsigned int mDeviceID;
403 std::string mOsVersion;
404 std::string mSdkVersion;
405 std::string mClientResource;
406 EMChatPrivateConfigs *mPrivateConfigs;
408 bool mEnableConsoleLog;
410 bool mAutoAcceptFriend;
411 bool mAutoAcceptGroup;
412 bool mRequireReadAck;
413 bool mRequireDeliveryAck;
414 bool mRequireServerAck;
415 bool mAutoConversationsLoaded;
416 bool mDeleteMessagesAsExitGroup;
417 bool mIsChatroomOwnerLeaveAllowed;
419 int mNumOfMessageLoaded;
421 bool mDeleteMessagesAsExitChatRoom;
422 bool mSortByServerTime;
423 bool mCallSendPushNotificaitonIfOffline;
424 EMNetCallbackPtr mNetCallback;
427 typedef std::shared_ptr<EMChatConfigs> EMChatConfigsPtr;
void setRequireReadAck(bool b)
set if need message read ack.
Definition: emchatconfigs.h:196
bool getIsChatroomOwnerLeaveAllowed() const
get if chatroom owner can leave.
Definition: emchatconfigs.h:289
int getNumOfMessageLoaded() const
get the number of message load at first time.
Definition: emchatconfigs.h:307
void setSdkVersion(const std::string &version)
set sdk version.
Definition: emchatconfigs.h:347
bool getDeleteMessageAsExitGroup() const
get if delete message when exit group.
Definition: emchatconfigs.h:272
bool getIsSandboxMode() const
get sandbox mode.
Definition: emchatconfigs.h:136
const std::string & getWorkPath() const
Get the work path.
Definition: emchatconfigs.h:87
void setEnableConsoleLog(bool b)
set if output the log to console.
Definition: emchatconfigs.h:145
void setAutoAcceptGroup(bool b)
set if auto accept group invitation.
Definition: emchatconfigs.h:179
bool getAutoAcceptFriend() const
get if auto accept friend invitation.
Definition: emchatconfigs.h:170
void setAutoAcceptFriend(bool b)
set if auto accept friend invitation.
Definition: emchatconfigs.h:162
bool getRequireReadAck() const
get if need message read ack.
Definition: emchatconfigs.h:204
bool getAutoConversationLoaded() const
get if load all conversation when login.
Definition: emchatconfigs.h:255
void setIsChatroomOwnerLeaveAllowed(bool b)
set if chatroom owner can leave.
Definition: emchatconfigs.h:281
bool getRequireServerAck() const
get if need message server receive ack.
Definition: emchatconfigs.h:238
OSType getOs() const
get os type.
Definition: emchatconfigs.h:323
void setNumOfMessageLoaded(int n)
set the number of message load at first time.
Definition: emchatconfigs.h:298
void setClientResource(const std::string &resource)
set client resource
Definition: emchatconfigs.h:370
void setLogPath(const std::string &path)
Set the log path.
Definition: emchatconfigs.h:96
unsigned int getDeviceID() const
get device unique id.
Definition: emchatconfigs.h:363
void setRequireServerAck(bool b)
set if need message server receive ack.
Definition: emchatconfigs.h:230
bool getEnableConsoleLog() const
get if output the log to console.
Definition: emchatconfigs.h:153
Definition: emattributevalue.h:28
void setDeleteMessageAsExitGroup(bool b)
set if delete message when exit group.
Definition: emchatconfigs.h:264
const std::string & getResourcePath() const
Get the resource path.
Definition: emchatconfigs.h:79
bool getAutoAcceptGroup() const
get if auto accept group invitation.
Definition: emchatconfigs.h:187
void setRequireDeliveryAck(bool b)
set if need message delivery ack.
Definition: emchatconfigs.h:213
void setOsVersion(const std::string &version)
set os version.
Definition: emchatconfigs.h:331
void setOs(const OSType os)
set os type.
Definition: emchatconfigs.h:315
const std::string & clientResource()
get client resource
Definition: emchatconfigs.h:377
void setAutoConversationLoaded(bool b)
set if need load all conversation when login.
Definition: emchatconfigs.h:247
const std::string & getOsVersion() const
get os version.
Definition: emchatconfigs.h:339
const std::string & getSdkVersion() const
get sdk version.
Definition: emchatconfigs.h:355
void setAppKey(const std::string &appKey)
Set the app key.
Definition: emchatconfigs.h:117
Definition: emchatconfigs.h:31
bool getRequireDeliveryAck() const
get if need message delivery ack.
Definition: emchatconfigs.h:221
void setDownloadPath(const std::string &path)
Set the download path.
Definition: emchatconfigs.h:107
void setIsSandboxMode(bool b)
set sandbox mode.
Definition: emchatconfigs.h:128