diff --git a/src/ebclib/lib/ebcore.dll b/src/build/ebcore.dll similarity index 100% rename from src/ebclib/lib/ebcore.dll rename to src/build/ebcore.dll diff --git a/src/build/ebvideoroom.dll b/src/build/ebvideoroom.dll index bece365..b6a0116 100644 Binary files a/src/build/ebvideoroom.dll and b/src/build/ebvideoroom.dll differ diff --git a/src/ebclib/lib/xvidcore9.dll b/src/build/xvidcore9.dll similarity index 100% rename from src/ebclib/lib/xvidcore9.dll rename to src/build/xvidcore9.dll diff --git a/src/ebclib/lib/xvidcore9d.dll b/src/build/xvidcore9d.dll similarity index 71% rename from src/ebclib/lib/xvidcore9d.dll rename to src/build/xvidcore9d.dll index b1f821d..4c13579 100644 Binary files a/src/ebclib/lib/xvidcore9d.dll and b/src/build/xvidcore9d.dll differ diff --git a/src/ebclib/inc/EBAppClient.h b/src/ebclib/inc/EBAppClient.h deleted file mode 100644 index dcbba01..0000000 --- a/src/ebclib/inc/EBAppClient.h +++ /dev/null @@ -1,1176 +0,0 @@ -// EBAppClient.h file here - -#ifndef __EBAppClient_h__ -#define __EBAppClient_h__ - -#include -#include -#include "../include/EBCallbackInterface.h" -#include "../include/chatroomobject.h" -//using namespace entboost; - -#ifdef EB_APPCLIENT_EXPORTS -#define EB_APPCLIENT_API __declspec(dllexport) -#else -#define EB_APPCLIENT_API __declspec(dllimport) -#endif - -namespace entboost { - -mycp::tstring EB_APPCLIENT_API GetHostIp(const char* lpszHostName,const char* lpszDefaultName); -bool EB_APPCLIENT_API GetAddressPort(const char* sFullAddress, mycp::tstring& sOutAddress, int & nOutPort); -//bool EB_APPCLIENT_API GetAccountAddress(const char* sFullAccount, mycp::tstring& sOutAddress); -void EB_APPCLIENT_API GetLocalHostOAuthKey(mycp::tstring& pOutLocalHostOAuthKey); - -// -class EB_APPCLIENT_API CEBAppClient -{ -public: - CEBAppClient(void); - virtual ~CEBAppClient(void); - - /**** 备注说明 ***********************************************************************/ - // 1.int函数返回,0/1为调用成功,负数为函数调用失败; - // 2.调用成功表示指令发送成功,业务执行是否成功,看回调函数处理事件的返回数据; - /*************************************************************************************/ - - /**** 应用(APP)环境 ***********************************************************************/ - /**** - 功能:初始化应用环境 - 参数:sAddress 服务器地址,格式1:ip:port 如122.122.122.122:1234 - 参数:sInitParameter 初始化参数,默认为空 - ====================================================================*/ - void EB_Init(const char * sAddress,const char* sInitParameter=""); - - /**** - 功能:判断是否已经初始化应用环境 - ====================================================================*/ - bool EB_IsInited(void) const; - - /**** - 功能:注册事件回调监听类 - 参数:pCallBack 回调监听类,NULL 空为注销 - ====================================================================*/ - void EB_SetCallBack(CEBCallbackInterface * pCallBack); - - /**** - 功能:注册事件回调监听窗口句柄 - 参数:pHwnd 回调监听窗口句柄,NULL 空为注销 - ====================================================================*/ - void EB_SetMsgHwnd(HWND pHwnd); - - /**** - 功能:注销应用环境 - ====================================================================*/ - void EB_UnInit(void); - - /**** - 功能:返回最后操作状态码 - ====================================================================*/ - EB_STATE_CODE EB_GetLastStateCode(void) const; - - /**** - 功能:返回服务器地址 - ====================================================================*/ - mycp::tstring EB_GetAddress(void) const; - - /**** - 功能:返回应用程序APP路径 - ====================================================================*/ - mycp::tstring EB_GetAppPath(void) const; - - /**** - 功能:返回资源文件存放路径 - ====================================================================*/ - mycp::tstring EB_GetResourcePath(void) const; - - /**** - 功能:返回应用程序APP数据路径 - ====================================================================*/ - mycp::tstring EB_GetAppDataPath(void) const; - - /**** - 功能:返回应用程序APP临时数据路径 - ====================================================================*/ - mycp::tstring EB_GetAppDataTempPath(void) const; - - /**** - 功能:检查最新版本 - 描述:如果有新版本,自动下载更新包文件,下载成功会收到onNewVersion()或EB_WM_NEW_VERSION通知 - 参数:sClientVersion 当前版本 - ====================================================================*/ - int EB_CheckVersion(const char* sClientVersion); - - /**** - 功能:获取地区信息 - 参数:nParent 上一级编码 - 参数:nParameter 事件通知参数 - ====================================================================*/ - int EB_GetAreaInfo(int nParent,unsigned int nParameter = 0); - - - /**** 开发者验证 ***********************************************************************/ - /**** - 功能:设置开发者appid和appkey - 参数:sAppId 开发者应用ID - 参数:sAppKey 应用KEY - 参数:bReLoadAppOnlineKey true:验证appid和appkey,获取最新app online key - ====================================================================*/ - int EB_SetDevAppId(eb::bigint sAppId,const char* sAppKey,bool bReLoadAppOnlineKey=true); - - /**** - 功能:设置开发者appid和app online key - ====================================================================*/ - void EB_SetDevAppOnlineKey(eb::bigint sAppId, const char* sAppOnlineKey); - - /**** - 功能:获取开发者appid和applinekey - ====================================================================*/ - eb::bigint EB_GetDevAppId(void) const; - mycp::tstring EB_GetDevAppOnlineKey(void) const; - - bool EB_SetSystemParameter(EB_SYSTEM_PARAMETER nParameter, unsigned long nParameterValue); - void EB_GetSystemParameter(EB_SYSTEM_PARAMETER nParameter, unsigned long* pParameterValue) const; - void EB_FreeSystemParameter(EB_SYSTEM_PARAMETER nParameter, unsigned long nParameterValue) const; - - /**** APP应用中心管理 ***********************************************************************/ - /**** - 功能:登录APP应用中心 - ====================================================================*/ - int EB_LogonAppCenter(void); - - /**** - 功能:登出APP应用中心 - ====================================================================*/ - void EB_LogoutAppCenter(void); - - /**** - 功能:发送信息给指定APP应用 - ====================================================================*/ - int EB_SendAPMsg(const EB_APMsgInfo& pAPMsgInfo, bool bSaveOffMsg); - - /**** - 功能:响应收到APP应用信息 - ====================================================================*/ - void EB_APMsgAck(eb::bigint nMsgId); - - /**** 注册、登录,个人信息 ***********************************************************************/ - /**** - 功能:注册一个新帐号 - 参数:sAccount 注册帐号,电子邮箱格式;类似user@entboost.com - 参数:sPwd 帐号密码 - 参数:sUserName 用户名称 - 参数:sEnterpriseName 企业名称,不为空,注册一个企业帐号 - ====================================================================*/ - int EB_Register(const char* sAccount, const char* sPassword, const char* sUserName="", const char* sEnterpriseName=""); - - /**** - 功能:游客登录 - ====================================================================*/ - int EB_LogonByVisitor(const char* sReqCode=""); - - /**** - 功能:用户登录 - ====================================================================*/ - int EB_LogonByAccount(const char * sAccount, const char * sPassword, const char* sReqCode="", const char * sOAuthKey="",EB_USER_LINE_STATE nNewLineState=EB_LINE_STATE_ONLINE_NEW); - - /**** - 功能:OAUTH验证 - 参数:sOAuthKey 用于自动登录 - ====================================================================*/ - int EB_LogonOAuth(eb::bigint nUserId, const char * sOAuthKey="",EB_USER_LINE_STATE nNewLineState=EB_LINE_STATE_ONLINE_NEW); - //int EB_LogonOAuth(const char * sAccount="",EB_USER_LINE_STATE nNewLineState=EB_LINE_STATE_ONLINE_NEW); - - /**** - 功能:重新登录,主要用于电脑挂起,或网络断开重启时,直接重新登录 - ====================================================================*/ - int EB_ReLogon(void); - - /**** - 功能:返回是否登录成功 - ====================================================================*/ - bool EB_IsLogoned(void) const; - - /**** - 功能:返回是否游客 - ====================================================================*/ - bool EB_IsLogonVisitor(void) const; - - /**** - 功能:用户退出 - ====================================================================*/ - void EB_Logout(void); - - /**** 基本信息管理 ***********************************************************************/ - /**** - 功能:登录成功后,加载离线信息 - 描述:先调用EB_LoadEnterprise()加载企业组织结构,个人群组和EB_LoadContact()加载通讯录,后再调用EB_LoadInfo() - ====================================================================*/ - void EB_LoadInfo(void); - - /****** - 功能:返回登录帐号信息 - ====================================================================*/ - bool EB_GetMyAccountInfo(EB_AccountInfo* pOutAccountInfo) const; - - /****** - 功能:设置登录帐号个人信息 - ====================================================================*/ - bool EB_SetMyAccountInfo(const EB_AccountInfo* pInAccountInfo); - - /****** - 功能:获取默认群组(部门)成员编号 - ====================================================================*/ - bool EB_GetMyDefaultMemberCode(eb::bigint& pOutDefaultMemberCode) const; - - /****** - 功能:设置默认群组(部门)成员编号 - 描述:默认群组(部门)成员编号,用于在外部呼叫中自动显示电子名片; - ====================================================================*/ - bool EB_SetMyDefaultMemberCode(eb::bigint nNewDefaultMemberCode); - - /****** - 功能:获取默认群组(部门)成员信息 - ====================================================================*/ - bool EB_GetMyDefaultMemberInfo(EB_MemberInfo* pOutMemberInfo) const; - - /****** - 功能:获取默认群组(部门)成员头像文件 - ====================================================================*/ - mycp::tstring EB_GetMyDefaultMemberHeadFile(void) const; - - /****** - 功能:返回个人设置 - ====================================================================*/ - int EB_GetMyAccountSetting(void) const; - - /****** - 功能:更新个人设置 - ====================================================================*/ - bool EB_SetMyAccountSetting(int nNewSetting); - - /**** - 功能:返回登录帐号 - ====================================================================*/ - mycp::tstring EB_GetLogonAccount(void) const; - eb::bigint EB_GetLogonUserId(void) const; - - /**** - 功能:返回帐号备注 - ====================================================================*/ - mycp::tstring EB_GetDescription(void) const; - - /**** - 功能:更新帐号备注 - ====================================================================*/ - bool EB_SetDescription(const char* sNewDescription); - - /**** - 功能:返回我的在线状态 - ====================================================================*/ - EB_USER_LINE_STATE EB_GetLineState(void)const; - - /**** - 功能:更改在线状态 - 描述:所有在线群组成员(包括自己)会收到onUserStateChange()或EB_WM_USER_STATE_CHANGE通知 - ====================================================================*/ - bool EB_SetLineState(EB_USER_LINE_STATE nNewLineState); - - /**** - 功能:返回帐号名称和密码 - 描述:帐号名称为空,名称=帐号 - ====================================================================*/ - //void EB_GetLogonInfo(mycp::tstring& sOutUserName, mycp::tstring& sOutPassword) const; - - /**** - 功能:返回帐号用户名称 - ====================================================================*/ - mycp::tstring EB_GetUserName(void) const; - - /**** - 功能:修改帐号用户名称 - ====================================================================*/ - bool EB_SetUserName(const char* sNewUserName); - - - /**** - 功能:返回帐号密码 - ====================================================================*/ - mycp::tstring EB_GetPassword(void) const; - - /**** - 功能:修改密码 - ====================================================================*/ - bool EB_SetPassword(const char* sOldPassword,const char* sNewPassword); - - /**** 权限管理 ***********************************************************************/ - /****** - 功能:判断是否有编辑企业资料权限 - 参数:sEnterpriseCode 企业代码,空为判断默认企业 - ====================================================================*/ - bool EB_CanEditEnterprise(eb::bigint nEnterpriseCode=0) const; - - /****** - 功能:判断是否有编辑群组(部门)资料权限 - 参数:sEnterpriseCode 企业代码,空为判断默认企业 - 参数:sGroupCode 群组代码,空为判断是否新建群组权限 - ====================================================================*/ - bool EB_CanEditGroupInfo(eb::bigint nEnterpriseCode,eb::bigint nGroupId) const; - - /****** - 功能:判断是否有删除群组(部门)资料权限 - 参数:sGroupCode 群组代码 - ====================================================================*/ - bool EB_CanDeleteGroupInfo(eb::bigint nGroupId) const; - bool EB_CanDeleteGroupInfo(eb::bigint nGroupId, eb::bigint nMemberUserId) const; - - bool EB_IsGroupCreator(eb::bigint nGroupId) const; - bool EB_IsGroupCreator(eb::bigint nGroupId, eb::bigint nMemberUserId) const; - bool EB_IsGroupManager(eb::bigint nGroupId) const; - bool EB_IsGroupManager(eb::bigint nGroupId, eb::bigint nMemberUserId) const; - - /****** - 功能:判断是否有编辑群组(部门)成员资料权限 - 参数:sGroupCode 群组代码 - 参数:sMemberAccount 成员帐号 - ====================================================================*/ - bool EB_CanEditMemberInfo(eb::bigint nGroupId,eb::bigint nMemberUserId) const; - - /****** - 功能:判断是否有编辑我的群组(部门)基础成员资料权限 - 参数:sGroupCode 群组代码 - ====================================================================*/ - bool EB_CanEditMyBaseMemberInfo(eb::bigint nGroupId) const; - - bool EB_CanEditMyBaseAccountInfo(void) const; - - /****** - 功能:判断是否有删除群组(部门)成员资料权限 - 参数:sGroupCode 群组代码 - 参数:sMemberAccount 成员帐号 - ====================================================================*/ - bool EB_CanDeleteMemberInfo(eb::bigint nGroupId,eb::bigint nMemberUserId) const; - - /****** - 功能:判断是否有删除群组(部门)成员资料权限 - 参数:sMemberCode 群组成员代码 - ====================================================================*/ - bool EB_CanDeleteMemberInfo(eb::bigint nMemberId) const; - - /****** - 功能:判断是否有编辑(新建)群组(部门)云盘资源权限 - ====================================================================*/ - bool EB_CanEditGroupRes(eb::bigint nGroupId, eb::bigint nResourceId) const; - - /****** - 功能:判断是否有删除群组(部门)云盘资源权限 - ====================================================================*/ - bool EB_CanDeleteGroupRes(eb::bigint nGroupId, eb::bigint nResourceId) const; - - /* 在线云盘管理 ***********************************************************************/ - /**** - 功能:加载云盘资源(向服务器请求) - 参数:sGroupCode 群组(部门)代码;不为空,加载群组资源;空为加载个人云盘资源 - ====================================================================*/ - int EB_LoadRes(eb::bigint nGroupId=0); - - /**** - 功能:获取目录下所有云资源 - ====================================================================*/ - void EB_GetDirAllRes(eb::bigint sParentResId,std::vector& pOutResourceList) const; - - /**** - 功能:获取没有目录所有云资源 - 参数:sGroupCode 群组(部门)代码;不为空,获取群组资源;空为获取个人云盘资源 - ====================================================================*/ - void EB_GetNotDirAllRes(std::vector& pOutResourceList,eb::bigint nGroupId=0) const; - - /**** - 功能:判断目录资源下,是否有资源信息 - ====================================================================*/ - bool EB_HasSubRes(eb::bigint sParentResId) const; - - /**** - 功能:获取所有云资源 - 参数:sGroupCode 群组(部门)代码;不为空,获取群组资源;空为获取个人云盘资源 - ====================================================================*/ - void EB_GetAllRes(std::vector& pOutResourceList,eb::bigint nGroupId=0) const; - - /**** - 功能:获取所有云文件资源 - 参数:sGroupCode 群组(部门)代码;不为空,获取群组资源;空为获取个人云盘资源 - ====================================================================*/ - void EB_GetAllFileRes(std::vector& pOutResourceList,eb::bigint nGroupId=0) const; - - /**** - 功能:获取所有云笔记资源 - 参数:sGroupCode 群组(部门)代码;不为空,获取群组资源;空为获取个人云盘资源 - ====================================================================*/ - void EB_GetAllNoteRes(std::vector& pOutResourceList,eb::bigint nGroupId=0) const; - - /**** - 功能:增加目录资源 - 参数:sGroupCode 群组(部门)代码;不为空,增加群组资源;空为增加个人云盘资源 - ====================================================================*/ - int EB_AddDirRes(const char* sDirName,eb::bigint sParentResId=0,eb::bigint nGroupId=0); - - /**** - 功能:增加文件资源 - 参数:sGroupCode 群组(部门)代码;不为空,增加群组资源;空为增加个人云盘资源 - ====================================================================*/ - int EB_AddFileRes(const char* sFilePath,const char* sFileName,const char* sDescription,eb::bigint sParentResId=0,eb::bigint nGroupId=0); - - /**** - 功能:增加临时群组文件资源 - 参数:nGroupId 群组(部门)代码; - ====================================================================*/ - int EB_AddTempGroupFileRes(const char* sFilePath,const char* sFileName,eb::bigint nGroupId); - - /**** - 功能:增加在线笔记资源 - 参数:sGroupCode 群组(部门)代码;不为空,增加群组资源;空为增加个人云盘资源 - ====================================================================*/ - int EB_AddNoteRes(const char* sNoteName,const char* sDescription,eb::bigint sParentResId=0,eb::bigint nGroupId=0); - - /**** - 功能:修改在线资源 - ====================================================================*/ - int EB_EditRes(eb::bigint sResId,const char* sName,const char* sDescription); - - /**** - 功能:移动资源到指定目录下 - ====================================================================*/ - int EB_MoveRes2Dir(eb::bigint sResId,eb::bigint sParentResId); - - /**** - 功能:删除在线资源 - ====================================================================*/ - int EB_DeleteRes(eb::bigint sResId); - - /**** - 功能:获取资源对象信息 - ====================================================================*/ - bool EB_GetResourceInfo(eb::bigint sResId,EB_ResourceInfo* pOutResourceInfo); - - /**** - 功能:获取资源对象信息 - ====================================================================*/ - bool EB_GetResourceCmInfo(eb::bigint sResId,mycp::tstring& pOutResourceInfo); - - - /**** - 功能:下载云盘资源文件 - ====================================================================*/ - int EB_DownloadFileRes(eb::bigint sResId,const char * sSaveTo); - - /**** - 功能:取消上传(或下载)云盘资源文件 - ====================================================================*/ - int EB_CancelFileRes(eb::bigint sResId,eb::bigint nMsgId); - - //bool UpdateInfo(const CPopParameterList& pInfoList); - //bool EnterChat(eb::bigint nCallId, const char* sAccount); // 记录在线状况 - //bool ExitChat(eb::bigint nCallId, const char* sAccount); // 记录在线状况 - - /* 会话管理 ***********************************************************************/ - /**** - 功能:呼叫群组成员 - 参数:sMemberCode 呼叫用户帐号,群组(部门)成员编号 - 参数:sExistCallId 不为空,表示邀请用户进多人会话 - ====================================================================*/ - int EB_CallMember(eb::bigint nMemberId,eb::bigint nExistCallId=0); - - /**** - 功能:呼叫用户 - 参数:sToAccount 呼叫用户帐号 - 参数:sExistCallId 不为空,表示邀请用户进多人会话 - ====================================================================*/ - int EB_CallAccount(const char* sToAccount,eb::bigint nExistCallId=0); - int EB_CallUserId(eb::bigint nToUserId,eb::bigint nExistCallId=0); - - /**** - 功能:会话邀请成员,转临时讨论组 - 参数:sCallId 会话ID - 参数:sToAccount 不为空,邀请第三方用户 - 参数:sMemberCode 邀请第三方用户,群组(部门)成员编号 - ====================================================================*/ - int EB_Call2Group(eb::bigint nCallId,const char* sToAccount); - - /**** - 功能:发起群组(部门)会话 - 参数:sGroupCode 群组(部门)编号 - ====================================================================*/ - int EB_CallGroup(eb::bigint nGroupId); - - /**** - 功能:应答一个会话请求 - 参数:bAccept true:接受会话;false:拒绝会话 - ====================================================================*/ - int EB_CallAnswer(eb::bigint nCallId,bool bAccept); - - /**** - 功能:挂断会话 - 描述:对方会收到挂断会话事件,如果不想挂断会话,使用EB_CallExit - ====================================================================*/ - int EB_CallHangup(eb::bigint nCallId); - - /**** - 功能:退出会话 - 描述:用于上层退出聊天窗口,清空会话 - ====================================================================*/ - void EB_CallExit(eb::bigint nCallId); - - /**** - 功能:发送会话通知 - 描述:nNotifyType=1: 用户正在输入 - ====================================================================*/ - void EB_CallNotify(eb::bigint nCallId, eb::bigint nToUserId, int nNotifyType, eb::bigint nNotifyId, const char* sNotifyData); - - /**** - 功能:检查会话成员,成员离线,重新呼叫 - 返回值:0=正常会话;1=正在重新呼叫离线成员;-1=会话不存在等其他错误 - ====================================================================*/ - //int EB_CheckReCall(eb::bigint nCallId,bool bOffReCall); - - /**** - 功能:会话聊天RICH格式缓存添加一个文本 - ====================================================================*/ - void EB_RichBufferAddText(eb::bigint nCallId,const char* sText); - - /**** - 功能:会话聊天RICH格式缓存添加一个图片对象(如JPG) - ====================================================================*/ - void EB_RichBufferAddObject(eb::bigint nCallId,const char* pData,unsigned long nSize); - - /**** - 功能:会话聊天RICH格式缓存添加一个资源对象(如表情) - ====================================================================*/ - void EB_RichBufferAddResource(eb::bigint nCallId,const char* sResource); - - /**** - 功能:清空会话聊天RICH格式缓存 - ====================================================================*/ - void EB_RichBufferClear(eb::bigint nCallId); - - /**** - 功能:发送会话聊天RICH格式缓存内容,发送完成自动清空缓存 - 参数:sToAccount 发给会话中指定用户,(用于群组会话中) - 参数:bPrivate 悄悄话功能 true:以私聊方式发给指定用户,会话其他人看不到 false:会话其他成员也可以看到 - ====================================================================*/ - int EB_SendRichBuffer(eb::bigint nCallId,eb::bigint nToUserId=0,bool bPrivate=false); - - /**** - 功能:发送文本消息 - 参数:sTextMsg 文本消息 - 参数:sToAccount 发给会话中指定用户,(用于群组会话中) - 参数:bPrivate 悄悄话功能 true:以私聊方式发给指定用户,会话其他人看不到 false:会话其他成员也可以看到 - ====================================================================*/ - int EB_SendText(eb::bigint nCallId,const char* sTextMsg,eb::bigint nToUserId=0,bool bPrivate=false); - - /**** - 功能:发送RICH消息 - 参数:pRichMsg RICH富格式,包括TEXT和JPG图片 - 参数:sToAccount 发给会话中指定用户,(用于群组会话中) - 参数:bPrivate 悄悄话功能 true:以私聊方式发给指定用户,会话其他人看不到 false:会话其他成员也可以看到 - ====================================================================*/ - int EB_SendRich(eb::bigint nCallId,const EB_ChatRoomRichMsg* pRichMsg,eb::bigint nToUserId=0,bool bPrivate=false); - - /**** - 功能:发送用户名片 - 参数:sCardUserAccount/nCardUserId 要发送名片用户帐号/用户ID - 参数:nToUserId 发给会话中指定用户,(用于群组会话中) - 参数:bPrivate 悄悄话功能 true:以私聊方式发给指定用户,会话其他人看不到 false:会话其他成员也可以看到 - ====================================================================*/ - int EB_SendUserCard(eb::bigint nCallId,const tstring& sCardUserAccount,eb::bigint nToUserId=0,bool bPrivate=false); - int EB_SendUserCard(eb::bigint nCallId,eb::bigint nCardUserId,eb::bigint nToUserId=0,bool bPrivate=false); - - /**** - 功能:解析名片信息 - 参数:[in] sInCardInfoString 要解析名片信息字符串 - 参数:[out] pOutCartType 名片类型;1=用户名片 - 参数:[out] pOutCardData 名片数据;配合 pOutCartType 使用,如果1=用户名片,调用 EB_ParseUserECard 解析用户名片 - ====================================================================*/ - bool EB_ParseCardInfo(const tstring& sInCardInfoString,int& pOutCardType,tstring& pOutCardData); - - /**** - 功能:解析用户电子名片 - 参数:[in] sInUserECardString 要解析用户名片字符串 - 参数:[out] pOutUserECard 用户电子名片类 - ====================================================================*/ - bool EB_GetUserECardByFromInfo(const tstring& sInUserECardString, EB_ECardInfo* pOutUserECard); - bool EB_GetUserECardByCardInfo(const tstring& sInUserECardString, EB_ECardInfo* pOutUserECard); - - //int EB_SendCard(eb::bigint nCallId,int nCardType,const char* sCardData,eb::bigint nToUserId=0,bool bPrivate=false); - int EB_SendMapPos(eb::bigint nCallId,const char* sMapPosData,eb::bigint nToUserId=0,bool bPrivate=false); - int EB_SendUserData(eb::bigint nCallId,const char* sUserData,unsigned long nDataSize,eb::bigint nToUserId=0,bool bPrivate=false); - - /**** - 功能:请求撤回消息(2分钟内有效),不支持P2P点对点文件消息 - ====================================================================*/ - int EB_RequestWithdawMsg(eb::bigint nCallId,eb::bigint nMsgId); - - /**** - 功能:请求收藏消息,不支持已经删除漫游消息 - 参数:nMsgId 收藏消息ID,如果消息已经在漫游消息被删除,收藏失败; - 参数:bGroupCollection 是否“群收藏”;true=群收藏 false=个人收藏 - ====================================================================*/ - int EB_RequestCollectMsg(eb::bigint nCallId,eb::bigint nMsgId, bool bGroupCollection); - - /**** - 功能:发送文件 - 参数:sFilePath 发送文件路径 - 参数:sToAccount 发给会话中指定用户,(用于群组会话中) - 参数:bPrivate 悄悄话功能 true:以私聊方式发给指定用户,会话其他人看不到 false:会话其他成员也可以看到 - 参数:bOffFile 保存离线文件 false/true - ====================================================================*/ - int EB_SendFile(eb::bigint nCallId,const char* sFilePath,eb::bigint nToUserId=0,bool bPrivate=false,bool bOffFile=false); - - /**** - 功能:接收文件 - 参数:nMsgId 文件消息编号 - 参数:sSaveTo 保存文件 - ====================================================================*/ - int EB_AcceptFile(eb::bigint nCallId,eb::bigint nMsgId,const char * sSaveTo); - - /**** - 功能:保存离线文件到我的云盘 - 参数:nMsgId 文件消息编号 - ====================================================================*/ - int EB_Save2CloudDrive(eb::bigint nCallId,eb::bigint nMsgId); - - /**** - 功能:接收离线文件(资源文件) - 参数:sResId 离线文件资源编号 - 参数:sSaveTo 保存路径 - ====================================================================*/ - //int EB_AcceptFileRes(eb::bigint nCallId,const char * sResId,const char * sSaveTo); - - /**** - 功能:取消或拒绝接收文件 - 参数:nMsgId 文件消息编号 - ====================================================================*/ - int EB_CancelFile(eb::bigint nCallId,eb::bigint nMsgId); - - /**** - 功能:获取会话成员信息 - ====================================================================*/ - bool EB_GetCallAccountInfoList(eb::bigint nCallId,std::vector& pOutUserList) const; - bool EB_GetCallUserIdList(eb::bigint nCallId,std::vector& pOutUserList) const; - bool EB_GetCallAccountList(eb::bigint nCallId,std::vector& pOutUserList) const; - - /**** - 功能:获取会话当前在线用户数量 - ====================================================================*/ - //int EB_GetCallOnlineSize(eb::bigint nCallId) const; - - /**** - 功能:获取会话指定用户信息 - ====================================================================*/ - bool EB_GetCallAccountInfo(eb::bigint nCallId,eb::bigint nUserId,EB_AccountInfo* pOutAccountInfo) const; - - /* 通讯录(联系人) ***********************************************************************/ - /**** - 功能:加载我的在线通讯录(联系人),包括所有分组信息 - 描述:登录成功后,调用加载一次 - ====================================================================*/ - int EB_LoadContact(void); - - /**** - 功能:修改(或新建)一条用户分组信息 - 参数:nUGId 用户分组ID,0表示新建 - 参数:sGroupName 分级名称,不能为空 - ====================================================================*/ - int EB_EditUGInfo(eb::bigint nUGId, const char* sGroupName); - - /**** - 功能:删除一条用户分组信息 - ====================================================================*/ - int EB_DeleteUGInfo(eb::bigint nUGId); - - /**** - 功能:删除一条用户分组信息 - ====================================================================*/ - int EB_GetUGContactSize(eb::bigint nUGId, int& pOutContactSize, int& pOutOnlineSize); - - /**** - 功能:获取联系人信息列表 - ====================================================================*/ - void EB_GetUGInfoList(std::vector& pOutUGInfoList) const; - - /**** - 功能:申请加了好友 - ====================================================================*/ - int EB_ReqAddContact(eb::bigint nContactUserId,const char * sDescription); - - /**** - 功能:修改(或新建)一条联系人资料 - ====================================================================*/ - int EB_EditContact(const EB_ContactInfo* pContactInfo); - - /**** - 功能:删除一条联系人资料 - ====================================================================*/ - int EB_DeleteContact(eb::bigint nContactId,bool bDeleteDest); - //int EB_DeleteContact(const char* sContactAccount); - - /**** - 功能:获取联系人信息列表 - ====================================================================*/ - void EB_GetContactList(std::vector& pOutContactList) const; - - /**** - 功能:获取联系人信息 - ====================================================================*/ - bool EB_GetContactInfo1(eb::bigint nContactId,EB_ContactInfo* pOutContactInfo) const; - bool EB_GetContactInfo2(eb::bigint nContactUserId,EB_ContactInfo* pOutContactInfo) const; - //bool EB_GetContactInfo(const char* sContactAccount,EB_ContactInfo* pOutContactInfo) const; - - /**** - 功能:获取联系人头像信息 - ====================================================================*/ - bool EB_GetContactHeadInfoByContactId(eb::bigint nContactId,tstring& pOutHeadFile,tstring& pOutHeadMd5,EB_USER_LINE_STATE& pOutLineState) const; - bool EB_GetContactHeadInfoByUserId(eb::bigint nUserId,tstring& pOutHeadFile,tstring& pOutHeadMd5,EB_USER_LINE_STATE& pOutLineState) const; - - /**** - 功能:判断是否我的联系人帐号 - ====================================================================*/ - bool EB_IsMyContactAccount1(eb::bigint nContactId) const; - bool EB_IsMyContactAccount2(eb::bigint nContactUserId) const; - //bool EB_IsMyContactAccount(const char* sContactAccount) const; - - /* 企业组织结构(个人群组信息) ***********************************************************************/ - /**** - 功能:加载在线所有企业组织结构和个人群组 - 描述:登录成功后,调用加载一次 - ====================================================================*/ - int EB_LoadOrg(void); - - /**** - 功能:加载在线指定群组(部门)信息 - 参数:bLoadMember true:同时加载成员信息 - ====================================================================*/ - int EB_LoadGroup(eb::bigint nGroupId,bool bLoadMember); - - /**** - 功能:获取企业信息 - 参数:sEnterpriseCode 企业代码;空为当前默认企业代码 - ====================================================================*/ - bool EB_GetEnterpriseInfo(EB_EnterpriseInfo* pOutEnterpriseInfo,eb::bigint nEnterpriseCode=0) const; - - bool EB_IsEnterpriseUser(eb::bigint nEnterpriseCode=0) const; - - /**** - 功能:获取企业名称 - 参数:sEnterpriseCode为空,获取当前默认企业名称 - ====================================================================*/ - bool EB_GetEnterpriseName(mycp::tstring& pOutEnterpriseName,eb::bigint nEnterpriseCode=0) const; - - /**** - 功能:获取企业在线用户信息 - 参数:sEnterpriseCode:企业代码 - ====================================================================*/ - void EB_GetEnterpriseMemberSize(eb::bigint nEnterpriseCode,int& pOutMemberSize,int& pOutOnlineSize) const; - - /**** - 功能:修改企业资料 - ====================================================================*/ - int EB_EditEnterprise(const EB_EnterpriseInfo* pEnterpriseInfo); - - /**** - 功能:修改或新建群组(部门)资料信息 - 描述:pGroupInfo->m_sGroupCode为空,表示新建 - ====================================================================*/ - int EB_EditGroup(const EB_GroupInfo* pGroupInfo); - - bool EB_IsGroupForbidSpeech(eb::bigint nGroupId) const; // 是否禁言群组 - int EB_SetGroupForbidSpeech(eb::bigint nGroupId, bool bForbidSpeech); // 是否禁言群组 - - /**** - 功能:删除部门或解散群组 - ====================================================================*/ - int EB_DeleteGroup(eb::bigint nGroupId); - - /**** - 功能:申请加入群组(部门) - ====================================================================*/ - int EB_JoinGroup(eb::bigint nGroupId,const char* sDescription); - - /**** - 功能:退出群组(部门) - ====================================================================*/ - int EB_ExitGroup(eb::bigint nGroupId); - - /**** - 功能:设置个人群组(部门)头像 - 描述:<= 1Mb - ====================================================================*/ - int EB_SetMyGroupHeadFile(eb::bigint nGroupId,const char* sImagePath); - - /**** - 功能:设置个人群组(部门)头像 - ====================================================================*/ - int EB_SetMyGroupHeadRes(eb::bigint nGroupId,eb::bigint sResId); - - /**** - 功能:获取群组(部门)信息 - ====================================================================*/ - bool EB_GetGroupInfo(eb::bigint nGroupId,EB_GroupInfo* pOutGroupInfo) const; - - /**** - 功能:获取群组(部门)名称 - ====================================================================*/ - bool EB_GetGroupName(eb::bigint nGroupId,mycp::tstring& pOutGroupName) const; - - /**** - 功能:获取群组(部门)创建者 - ====================================================================*/ - bool EB_GetGroupCreator(eb::bigint nGroupId,eb::bigint& pOutGroupCreator) const; - - /**** - 功能:获取群组(部门)类型 - ====================================================================*/ - bool EB_GetGroupType(eb::bigint nGroupId,EB_GROUP_TYPE& pOutGroupType) const; - - /**** - 功能:获取群组(部门)成员信息 - ====================================================================*/ - bool EB_GetGroupMemberInfoList(eb::bigint nGroupId,std::vector& pOutMemberInfoList) const; - - /**** - 功能:获取群组(部门)成员帐号 - ====================================================================*/ - bool EB_GetGroupMemberUserIdList(eb::bigint nGroupId,std::vector& pOutMemberUserIdList) const; - bool EB_GetGroupMemberCodeList(eb::bigint nGroupId,std::vector& pOutMemberCodeList) const; - bool EB_GetGroupMemberAccountList(eb::bigint nGroupId,std::vector& pOutMemberAccountList) const; - - /**** - 功能:获取群组(部门)成员数量 - 参数:nGetType 0=按照系统配置是否统计子部门数量;1=只统计当前部门数量;2=统计子部门数量 - ====================================================================*/ - int EB_GetGroupMemberSize(eb::bigint nGroupId, int nGetType) const; - bool EB_GetGroupMemberSize(eb::bigint nGroupId, int nGetType, int& pOutMemberSize, int& pOutOnlineSize) const; - - /**** - 功能:获取群组(部门)在线成员数量 - 参数:nGetType 0=按照系统配置是否统计子部门数量;1=只统计当前部门数量;2=统计子部门数量 - ====================================================================*/ - int EB_GetGroupOnlineSize(eb::bigint nGroupId, int nGetType) const; - - /**** - 功能:判断是否是我的群组(部门) - 参数:sGroupCode 群组(部门)代码 - ====================================================================*/ - bool EB_IsMyGroup(eb::bigint nGroupId) const; - - /**** - 功能:修改或新建群组(部门)成员信息,主要用于添加部门员工或修改员工资料 - 描述:pMemberInfo->m_sMemberCode成员编号为空,表示新建 - ====================================================================*/ - int EB_EditMember(const EB_MemberInfo* pMemberInfo); - - bool EB_IsGroupAdminLevel(eb::bigint nGroupId) const; // 是否群组管理员权限 - bool EB_IsGroupAdminLevel(eb::bigint nGroupId, eb::bigint nMemberUserId) const; // 是否群组管理员权限 - int EB_AddGroupAdminLevel(eb::bigint nGroupId, eb::bigint nMemberUserId); // 增加群组管理员权限 - int EB_DelGroupAdminLevel(eb::bigint nGroupId, eb::bigint nMemberUserId); // 删除群组管理员权限 - - bool EB_IsMemberForbidSpeech(eb::bigint nGroupId, eb::bigint nMemberUserId,int& pOutForbidMinutes); // 判断群组成员是否禁言 - /**** - 功能:设置或解除群组(部门)成员禁言 - 描述: - 参数:bForbidSpeech : 禁言或解除禁言 true=禁言 false=解除禁言 - 参数:nForbidMinutes: 禁言分钟数 -1=不处理 0=配合bForbidSpeech=true永久禁言 大于0=配合bForbidSpeech=true禁言多少分钟 - ====================================================================*/ - int EB_SetMemberForbidSpeech(eb::bigint nGroupId, eb::bigint nMemberUserId, bool bForbidSpeech, int nForbidMinutes=0); // 设置群组成员禁言 - - /**** - 功能:删除群组(部门)成员 - ====================================================================*/ - int EB_DeleteMember(eb::bigint nMemberId, bool bDeleteAccount=true); - - /**** - 功能:获取群组(部门)成员信息 - ====================================================================*/ - bool EB_GetMemberInfoByUserId(EB_MemberInfo* pOutMemberInfo,eb::bigint nGroupId,eb::bigint nMemberUserId) const; - bool EB_GetMemberInfoByAccount(EB_MemberInfo* pOutMemberInfo,eb::bigint nGroupId,const char* sMemberAccount) const; - - /**** - 功能:获取群组(部门)成员信息 - ====================================================================*/ - bool EB_GetMemberInfoByUserId2(EB_MemberInfo* pOutMemberInfo,eb::bigint nMemberUserId) const; - bool EB_GetMemberInfoByUserId2(EB_MemberInfo* pOutMemberInfo,EB_GroupInfo* pOutGroupInfo,eb::bigint nMemberUserId) const; - bool EB_GetMemberInfoByAccount2(EB_MemberInfo* pOutMemberInfo,const char* sMemberAccount) const; - bool EB_GetMemberInfoByAccount2(EB_MemberInfo* pOutMemberInfo,EB_GroupInfo* pOutGroupInfo,const char* sMemberAccount) const; - - /**** - 功能:获取群组(部门)成员信息 - ====================================================================*/ - bool EB_GetMemberInfoByMemberCode(EB_MemberInfo* pOutMemberInfo,eb::bigint nMemberId) const; - bool EB_GetMemberInfoByMemberCode(EB_MemberInfo* pOutMemberInfo,EB_GroupInfo* pOutGroupInfo,eb::bigint nMemberId) const; - - /**** - 功能:获取群组(部门)成员头像信息 - ====================================================================*/ - bool EB_GetMemberHeadInfoByMemberCode(eb::bigint nMemberId,tstring& pOutHeadFile,tstring& pOutHeadMd5,EB_USER_LINE_STATE& pOutLineState) const; - bool EB_GetMemberHeadInfoByUserId(eb::bigint nGroupId,eb::bigint nMemberUserId,tstring& pOutHeadFile,tstring& pOutHeadMd5,EB_USER_LINE_STATE& pOutLineState) const; - bool EB_GetMemberHeadInfoByUserId(eb::bigint nMemberUserId,tstring& pOutHeadFile,tstring& pOutHeadMd5,EB_USER_LINE_STATE& pOutLineState) const; - bool EB_GetMemberHeadInfoByAccount(const char* sMemberAccount,tstring& pOutHeadFile,tstring& pOutHeadMd5,EB_USER_LINE_STATE& pOutLineState) const; - - /**** - 功能:获取群组(部门)成员名称 - ====================================================================*/ - bool EB_GetMemberNameByUserId(eb::bigint nGroupId,eb::bigint nMemberUserId,mycp::tstring& pOutMemberName) const; - - /**** - 功能:获取群组(部门)成员名称 - ====================================================================*/ - bool EB_GetMemberNameByMemberCode(eb::bigint nMemberId,mycp::tstring& pOutMemberName) const; - - /**** - 功能:获取群组(部门)成员在线状态 - ====================================================================*/ - bool EB_GetMemberLineState(eb::bigint nMemberId,EB_USER_LINE_STATE& pOutLineState) const; - - /**** - 功能:获取群组(部门)头像文件 - ====================================================================*/ - bool EB_GetMemberHeadFile(eb::bigint nMemberId,eb::bigint& pOutResourceId,mycp::tstring& pOutHeadPath,mycp::tstring& pOutFileMd5); - bool EB_GetMemberHeadFile(eb::bigint nGroupId,eb::bigint nUserId,eb::bigint& pOutResourceId,mycp::tstring& pOutHeadPath,mycp::tstring& pOutFileMd5); - - /**** - 功能:获取我的群组(部门)成员信息 - 参数:sGroupCode 群代码为空,获取默认群组成员信息 - ====================================================================*/ - bool EB_GetMyMemberInfo(EB_MemberInfo* pOutMemberInfo,eb::bigint nGroupId=0) const; - - /**** - 功能:获取我的所有群组(部门)成员信息 - 描述:包括企业部门员工信息和个人群组成员信息 - ====================================================================*/ - void EB_GetMyMemberList(std::vector& pOutMemberInfoList) const; - - /**** - 功能:判断是否存在群组(部门)成员 - 参数:sGroupCode 群组(部门)代码 - 参数:sMemberAccount 成员帐号 - ====================================================================*/ - bool EB_IsExistMemberByUserId(eb::bigint nGroupId,eb::bigint nMemberUserId) const; - bool EB_IsExistMemberByUserId(eb::bigint nMemberUserId) const; - bool EB_IsExistMemberByAccount(eb::bigint nGroupId,const char* sMemberAccount) const; - bool EB_IsExistMemberByAccount(const char* sMemberAccount) const; - - /**** - 功能:判断是否存在群组(部门)成员 - 参数:sMemberCode 成员代码 - ====================================================================*/ - bool EB_IsExistMemberByMemberCode(eb::bigint nMemberId) const; - - /**** - 功能:获取表情库信息 - ====================================================================*/ - bool EB_GetMyEmotionList(std::vector& pOutEmotionList) const; - - /**** - 功能:获取默认头像信息 - ====================================================================*/ - bool EB_GetDefaultHeadList(std::vector& pOutEmotionList) const; - - /**** 搜索查找 ***********************************************************************/ - /**** - 功能:查找企业所有部门信息(组织结构) - 参数:sEnterpriseCode为空,查找默认企业 - 参数:dwParam 由CEBSearchCallback回调函数返回; - ====================================================================*/ - void EB_FindAllGroupInfo(CEBSearchCallback * pCallback,eb::bigint nEnterpriseCode=0,unsigned long dwParam=0); - - /**** - 功能:查找所有通讯录(联系人)信息 - 参数:dwParam 由CEBSearchCallback回调函数返回; - ====================================================================*/ - void EB_FindAllContactInfo(CEBSearchCallback * pCallback,unsigned long dwParam=0); - - /**** - 功能:搜索用户,包括企业部门员工,个人群组成员和通讯录用户 - 参数:sSearchKey 搜索关键词,""空搜索所有 - 参数:dwParam 由CEBSearchCallback回调函数返回; - ====================================================================*/ - void EB_SearchUserInfo(CEBSearchCallback * pCallback,const char* sSearchKey,unsigned long dwParam=0); - - /**** 远程桌面(远程协助) ***********************************************************************/ - /**** - 功能:请求会话远程桌面(远程协助) - ====================================================================*/ - int EB_RDRequest(eb::bigint nCallId,EB_REMOTE_DESKTOP_TYPE nRDType=EB_RD_DESKTOP_SRC); - - /**** - 功能: 接受(加入)或拒绝远程桌面(远程协助) - 参数:bAccept true:接受远程桌面 false:拒绝远程桌面 - ====================================================================*/ - int EB_RDAck(eb::bigint nCallId,bool bAccept,eb::bigint nToUserId); - - /**** - 功能: 结束或退出远程桌面 - ====================================================================*/ - int EB_RDEnd(eb::bigint nCallId); - - void EB_SetDesktopHwnd(eb::bigint nCallId,HWND pHwnd); - - // quant : 1-20; default 12 - // fps : 0-10; 0=disable; default 2 - int EB_OpenLocalDesktop(eb::bigint nCallId, int quant=12, int fps = 2); - // eb::bigint nUserId : 0 disable - void EB_EnableControlLocalDesktop(eb::bigint nCallId, eb::bigint nUserId); - eb::bigint EB_EnableControlLocalDesktop(eb::bigint nCallId) const; - void EB_CloseLocalDesktop(eb::bigint nCallId); - - bool EB_OpenRemoteDesktop(eb::bigint nCallId,eb::bigint nUserId, HWND hWndParent); - // int nMouseMoveFPS: 0: disable - bool EB_ControlRemoteDesktop(eb::bigint nCallId,eb::bigint nUserId, int nMouseMoveFPS = 3); - int EB_ControlRemoteDesktop(eb::bigint nCallId,eb::bigint nUserId) const; - void EB_MoveRemoteDesktopWindow(eb::bigint nCallId, eb::bigint nUserId, int x, int y, int width, int height, BOOL bRepaint); - void EB_CloseRemoteDesktop(eb::bigint nCallId,eb::bigint nUserId); - - void EB_CloseAllDesktop(eb::bigint nCallId); - - bool EB_GetUserRDInfo(eb::bigint nCallId,std::vector& pOutVideoUserInfo) const; - - /**** 视频通讯 ***********************************************************************/ - /**** - 功能:获取本地视频设备名称列表 - ====================================================================*/ - static void EB_GetVideoDeviceList(std::vector& pOutVideoDeviceList); - - /**** - 功能:获取默认视频媒体类型 - ====================================================================*/ - //static int EB_GetDefaultVideoMediaType(void); - - /**** - 功能:设置会话视频显示数据统一回调函数 - ====================================================================*/ - void EB_SetVideoCallback(eb::bigint nCallId, PEBVideoCallBack cbAudio); - //void EB_SetVideoCallback(eb::bigint nCallId,PVideoDataCallBack cbVideo,PAudioDataCallBack cbAudio); - - /**** - 功能:设置会话视频业务回调窗口句柄,空为取消,使用默认句柄 EB_SetMsgHwnd - ====================================================================*/ - void EB_SetVideoHwnd(eb::bigint nCallId,HWND pHwnd); - - /**** - 功能:取消会话视频业务回调窗口句柄,使用默认句柄 EB_SetMsgHwnd - ====================================================================*/ - //void EB_DelVideoHwnd(eb::bigint nCallId); - - /**** - 功能:请求会话视频通讯 - ====================================================================*/ - int EB_VideoRequest(eb::bigint nCallId,EB_VIDEO_TYPE nVideoType=EB_VIDEO_BOTH); - - /**** - 功能: 接受(加入)或拒绝会话视频通讯 - 参数:bAccept true:接受视频通讯 false:拒绝视频通讯 - ====================================================================*/ - int EB_VideoAck(eb::bigint nCallId,bool bAccept,eb::bigint nToUserId); - - /**** - 功能: 结束或退出会话视频通讯 - ====================================================================*/ - int EB_VideoEnd(eb::bigint nCallId); - - /**** - 功能: 获取会话,所有用户视频编号; - ====================================================================*/ - bool EB_GetUserVideoInfo(eb::bigint nCallId,std::vector& pOutVideoUserInfo) const; - - /**** - 功能:打开会话,本地视频设备 - 描述:根据视频请求,打开视频设备(或声卡设备、或二个同时打开) - 参数:sCallId 会话编号 - 参数:nLocalVideoIndex 打开指定索引位置视频设备,0开始(EB_VIDEO_BOTH有效) - 参数:[输出]返回本地视频媒体类型,用于视频显示用 - 参数:PAudioDataCallBack cbAudio 音频数据回调函数 - 参数:void* pParam 音频数据回调参数 - 返回:返回本地用户视频编号 -1表示失败 - ====================================================================*/ - int EB_OpenLocalVideo(eb::bigint nCallId,int nLocalVideoIndex,HWND hVideoWndParent, void* pUserData=0); - //int EB_OpenLocalVideo(eb::bigint nCallId,int nLocalVideoIndex,int& pOutVideoMediaType,DWORD dwParamVideo,DWORD dwParamAudio); - - - /**** - 功能:打开会话,远程用户视频 - 参数:sCallId 会话编号 - 参数:sUserAccount 会话用户帐号 - 参数:PAudioDataCallBack cbAudio 音频数据回调函数 - 参数:void* pParam 音频数据回调参数 - ====================================================================*/ - bool EB_OpenUserVideo(eb::bigint nCallId,eb::bigint nUserId,HWND hVideoWndParent, void* pUserData=0); - //bool EB_OpenVideo(eb::bigint nCallId,eb::bigint nUserId,DWORD dwParamVideo,DWORD dwParamAudio); - - /**** - 功能:设置打开或屏蔽视频 - 参数:sCallId 会话编号 - 参数:nUserId 会话用户帐号 - 参数:bOpen 打开或屏蔽视频 - ====================================================================*/ - bool EB_SetVideoOpenClose(eb::bigint nCallId,eb::bigint nUserId,bool bOpen); - - /**** - 功能:设置打开或屏蔽声音 - 参数:sCallId 会话编号 - 参数:nUserId 会话用户帐号 - 参数:bOpen 打开或屏蔽声音 - ====================================================================*/ - bool EB_SetAudioOpenClose(eb::bigint nCallId,eb::bigint nUserId,bool bOpen); - //bool EB_GetAudioOpenClose(eb::bigint nCallId,eb::bigint nUserId) const; - - /**** - 功能:关闭会话所有视频 - ====================================================================*/ - void EB_CloseAllVideo(eb::bigint nCallId); - - /**** 应用功能 ***********************************************************************/ - /**** - 功能:根据定位位置,获取订购应用功能信息 - 参数:nFuncLocation,定位位置 - ====================================================================*/ - int EB_GetSubscribeFuncList(EB_FUNC_LOCATION nFuncLocation,std::vector& pOutFuncInfo) const; - - /**** - 功能:根据定位位置,获取订购应用功能数量 - 参数:nFuncLocation,定位位置 - ====================================================================*/ - int EB_GetSubscribeFuncSize(EB_FUNC_LOCATION nFuncLocation) const; - - /**** - 功能:根据订购ID,获取订购应用功能信息 - 参数:nSubId,订购ID - ====================================================================*/ - bool EB_GetSubscribeFuncInfo(eb::bigint nSubId, EB_SubscribeFuncInfo* pOutFuncInfo) const; - - /**** - 功能:打开某个应用功能 - 参数:nSubscribeId,订购ID - ====================================================================*/ - mycp::tstring EB_GetSubscribeFuncUrl(eb::bigint nSubscribeId,eb::bigint nCallId=0,eb::bigint nFromUserId=0,const mycp::tstring& sFromAccount="",eb::bigint nGroupId=0) const; - - /**** - 功能:获取在线聊天记录URL - 参数:nSubscribeId,订购ID - ====================================================================*/ - mycp::tstring EB_GetConversationsUrl(eb::bigint nFromUserId,eb::bigint nGroupId) const; - - /**** - 功能:接受或拒绝某个业务请求(如申请加入群组) - 参数:sMsgId,消息ID - 参数:bAccept,接受或拒绝 true/false - ====================================================================*/ - void EB_AckMsg(eb::bigint nMsgId,bool bAccept) const; - // 1=接受(确认); 2=拒绝; 3=离线接受; 4=超时; 5=删除 - void EB_AckMsg(eb::bigint nMsgId,int nAckType) const; - -private: - void* m_handle; -}; - -} // namespace entboost - -#endif // __EBAppClient_h__ diff --git a/src/ebclib/inc/chatroom.h b/src/ebclib/inc/chatroom.h deleted file mode 100644 index 7ae585f..0000000 --- a/src/ebclib/inc/chatroom.h +++ /dev/null @@ -1,92 +0,0 @@ -// chatroom.h file here -// 版权所有:恩布(ENTBOOST)互联网络科技有限公司 2012-2013 -// 版 本:2.0.0.100 - -#ifndef __chatroom_h__ -#define __chatroom_h__ - -#include -#include -#include "../include/chatroomhandle.h" - -namespace entboost { - -class CHATROOM_API Cchatroom -{ -public: - typedef boost::shared_ptr pointer; - static Cchatroom::pointer create(void) - { - return Cchatroom::pointer(new Cchatroom()); - } - Cchatroom(void); - virtual ~Cchatroom(void); - - /**** - 功能:初始化应用环境 - ==============================================================================================================================*/ - void SetSslKey(const char* sSslPublicKey,const char* sSslPrivateKey,const char* sSslPrivatePwd); - int Start(const char * address, const char * sAppName, unsigned int bindPort,bool bBuildResponseThread, int nUsesSsl, int nMaxWaitSecons=2); - tstring GetAddress(void) const; - //tstring GetLocalIp(void) const; - unsigned short GetLocalPort(void) const; - bool IsStart(void) const; - void SetCallBack(CChatRoomCallBack * pCallBack); - void SetMsgHwnd(HWND pHwnd); - void SetParam(unsigned long nParam); - //void SetParam(const tstring& sParam); - void Stop(void); - - // - //int SetResource(const char* sResourceId,const char* sAccount,const char* sResourceKey,const char* sFilePath); - - int EnterRoom(cr::bigint nFromUserId, cr::bigint sChatId, const char* sCmKey, int nType=1, cr::bigint sCallid=0, cr::bigint sDepCode=0); - bool IsEnterOk(void) const; - int GetAccount(cr::bigint & pOutUserId) const; - int GetChatId(cr::bigint & pOutChatId) const; - int SetCallId(cr::bigint nCallId); - int GetCallId(cr::bigint & pOutCallId) const; - int ExitRoom(int nExitSes); // 0/1 - int Notify(cr::bigint nToUserId, int nNotifyType, cr::bigint nNotifyId, const char* sNotifyData); - - size_t GetUserSize(void) const; - void GetUserList(std::vector & pOutUserList) const; - - void RichBufferAddText(const char* sTextMsg); - void RichBufferAddObject(const char* pData, unsigned long nSize); - void RichBufferAddResource(const char* sResource); - void RichBufferClear(void); - int SendRichBuffser(cr::bigint sTo=0,bool nPrivate=false); - int SendMapPos(const char * sPosData); - int SendRich(const EB_ChatRoomRichMsg* pRichMsg,cr::bigint sTo=0,bool bPrivate=false); - int SendFile(const char * sFilePath,cr::bigint sTo=0,bool bPrivate=false,bool bSendOffFile=false); - int SendResource(cr::bigint sResourceId,const char * sFilePath,bool bNewUpload); - int CancelSendingFile(cr::bigint nMsgId); - int ReceiveFile(cr::bigint nMsgId, const char * sSaveTo); - int SaveFile2CloudDrive(cr::bigint nMsgId); - int ResendMsg(cr::bigint nMsgId); - int MsgAck(cr::bigint nMsgId,int nAckType); - int RecviveResource(cr::bigint sResourceId,const char* sSaveTo); - - int SetDestAddress(int nUserIndex,const tstring& sToAddress); - int SendP2PRequest(cr::bigint nFromUid,cr::bigint nChatId,cr::bigint nToAccount,const tstring& sLocalIp,int nRequestData); - int SendP2PResponse(cr::bigint nFromUid,cr::bigint nChatId,cr::bigint nToAccount,const tstring& sLocalIp,int nResponseData); - int SendP2PTry(cr::bigint nCallId,cr::bigint nChatId,cr::bigint nFromAccount,int nP2PData); - void SendP2PTest(unsigned short nTestCount=3); - cr::bigint GetP2POwnerAccount(void) const; - - ////**** video - //// VideoType: 1:audio; 2:audio&video - //void SetVideoHwnd(HWND pHwnd); - //int VideoRequest(int nVideoType=2); - //int VideoAck(bool bAccept); - //int VideoEnd(void); - //int GetVideoUserId(int & pOutMyVideoUserId, std::vector& pOutFromVideoUserId); - -private: - void * m_handle; -}; - -} // namespace entboost - -#endif //__chatroom_h__ diff --git a/src/ebclib/include/EBCallbackInterface.h b/src/ebclib/include/EBCallbackInterface.h deleted file mode 100644 index 180eaea..0000000 --- a/src/ebclib/include/EBCallbackInterface.h +++ /dev/null @@ -1,311 +0,0 @@ -// EBCallbackInterface.h file here - -#ifndef __EBCallbackInterface_h__ -#define __EBCallbackInterface_h__ -#ifdef WIN32 -#include "Windows.h" -#endif // WIN32 -#include "eb_object.h" -#include "chatroomhandle.h" - -namespace entboost { - -//搜索回调函数 -class CEBSearchCallback -{ -public: - virtual void onGroupInfo(const EB_GroupInfo* pGroupInfo,const EB_EnterpriseInfo* pEnterpriseInfo, unsigned long dwParam) = 0; - virtual void onMemberInfo(const EB_GroupInfo* pGroupInfo, const EB_MemberInfo* pMemberInfo, unsigned long dwParam) = 0; - virtual void onContactInfo(const EB_ContactInfo* pContactInfo, unsigned long dwParam) = 0; -}; - -#define EB_CALLBACK_FIRST_VIDEO_FPS 1 -#define EB_CALLBACK_VOICE_VOLUME 2 -typedef void (*PEBVideoCallBack) (eb::bigint nUserId, int nCallBackType, unsigned int lParam, unsigned int wParam, void* pUserData); - - -// 应用回调函数 -class CEBCallbackInterface -#ifdef USES_CHATROOM - : public CChatRoomCallBack -#endif -{ -public: - // APP - virtual void onAppIdSuccess(eb::bigint appId,const char* appOnlineKey) {} - virtual void onAppIdError(EB_STATE_CODE nState) {} - - virtual void onLogonAppCenter(EB_STATE_CODE nState) {} - virtual void onLogoutAppCenter(EB_STATE_CODE nState) {} - virtual int onAPMsgInfo(const EB_APMsgInfo& pAPMsgInfo) {return 1;} // 返回1,自动响应 - - virtual void onRegisterResponse(EB_STATE_CODE nState,eb::bigint nUserId) {} - - virtual void onOAuthForward(const std::string& sOAuthUrl) {} - virtual void onLogonSuccess(const EB_AccountInfo& pAccountInfo) {} - virtual void onLogonTimeout(const EB_AccountInfo& pAccountInfo) {} - virtual void onLogonError(const EB_AccountInfo& pAccountInfo,EB_STATE_CODE nState) {} - virtual void onOnlineAnother(int nOnlineAnotherType) {} // 0=在其他地方登录 1=修改密码退出 - virtual void onLogout(void) {} - virtual void onAccountInfoChange(const EB_AccountInfo& pAccountInfo) {} - - virtual void onEditInfoResponse(EB_STATE_CODE nState, int nFlag) {} // 个人资料修改返回 - virtual void onUserStateChange(const EB_MemberInfo* pMemberInfo, bool bIsOwnerMember) {} // 修改在线状态 - virtual void onUserHeadChange(const EB_MemberInfo* pMemberInfo, bool bIsOwnerMember) {} // 修改群组头像 - virtual void onContactHeadChange(const EB_ContactInfo* pContactInfo) {} // 好友/联系人修改头像 - - // 呼叫(会话) - virtual void onCallIncoming(const EB_CallInfo& pCallInfo, const EB_AccountInfo& pFromAccount) {} - virtual void onCallAlerting(const EB_CallInfo& pCallInfo) {} - virtual void onCallBusy(const EB_CallInfo& pCallInfo) {} - virtual void onCallHangup(const EB_CallInfo& pCallInfo, bool bOwner) {} - virtual void onCallError(const EB_CallInfo& pCallInfo,EB_STATE_CODE nState) {} - virtual void onCallConnected(const EB_CallInfo& pCallInfo, int nConnectFlag) {} - - // 远程桌面(远程协助) - virtual void onRDRequestResponse(const EB_RemoteDesktopInfo& pRDInfo, EB_STATE_CODE nState) {} - virtual void onRDAckResponse(const EB_RemoteDesktopInfo& pRDInfo, EB_STATE_CODE nState) {} - virtual void onRDRequest(const EB_RemoteDesktopInfo& pRDInfo) {} // 收到一个RD连接请求 - virtual void onRDAccept(const EB_RemoteDesktopInfo& pRDInfo) {} // 对方接受RD - virtual void onRDReject(const EB_RemoteDesktopInfo& pRDInfo) {} // 对方拒绝RD - virtual void onRDClose(const EB_RemoteDesktopInfo& pRDInfo) {} // 对方关闭RD - - // 视频 - virtual void onVRequestResponse(const EB_VideoInfo& pVideoInfo, EB_STATE_CODE nState) {} - virtual void onVAckResponse(const EB_VideoInfo& pVideoInfo, EB_STATE_CODE nState) {} - virtual void onVideoRequest(const EB_VideoInfo& pVideoInfo, const EB_UserVideoInfo& sFromAccount) {} // 收到一个视频连接请求 - virtual void onVideoAccept(const EB_VideoInfo& pVideoInfo, const EB_UserVideoInfo& sFromAccount) {} // 对方接受视频 - virtual void onVideoReject(const EB_VideoInfo& pVideoInfo, const EB_UserVideoInfo& sFromAccount) {} // 对方拒绝视频 - virtual void onVideoTimeout(const EB_VideoInfo& pVideoInfo, const EB_UserVideoInfo& sFromAccount) {} // 视频请求超时 - virtual void onVideoClose(const EB_VideoInfo& pVideoInfo, const EB_UserVideoInfo& sFromAccount) {} // 对方关闭视频 - - // 组织结构 - virtual void onEnterpriseInfo(const EB_EnterpriseInfo* pEnterpriseInfo) {} // - virtual void onGroupInfo(const EB_GroupInfo* pGroupInfo, bool bIsMyGroup) {} // - virtual void onGroupDelete(const EB_GroupInfo* pGroupInfo, bool bIsMyGroup) {} // - virtual void onGroupEditError(const EB_GroupInfo* pGroupInfo, EB_STATE_CODE nState) {} // - virtual void onRemoveGroup(const EB_GroupInfo* pGroupInfo, const EB_MemberInfo* pMemberInfo) {} // 成员被移出群组 - virtual void onExitGroup(const EB_GroupInfo* pGroupInfo, const EB_MemberInfo* pMemberInfo) {} // 用户退出群组 - virtual void onRequestAdd2Group(const EB_AccountInfo* pAccountInfo,const EB_APMsgInfo* pApMsgInfo) {} // 用户申请加入群组 - virtual void onInviteAdd2Group(const EB_AccountInfo* pAccountInfo,const EB_APMsgInfo* pApMsgInfo) {} // 用户邀请加入群组 - virtual void onRejectAdd2Group(const EB_AccountInfo* pAccountInfo,const EB_APMsgInfo* pApMsgInfo) {} // 拒绝加入群组 - virtual void onMemberInfo(const EB_MemberInfo* pMemberInfo, bool bIsMyDefaultMember) {} // - virtual void onMemberDelete(const EB_MemberInfo* pMemberInfo, bool bIsMyDefaultMember) {} // - virtual void onMemberEditError(const EB_MemberInfo* pMemberInfo, EB_STATE_CODE nState) {} // - - // 通讯录(联系人) - virtual void onUGInfo(const EB_UGInfo* pUGInfo) {} // - virtual void onUGDelete(const EB_UGInfo* pUGInfo) {} // - virtual void onContactInfo(const EB_ContactInfo* pContactInfo) {} // - virtual void onContactDelete(const EB_ContactInfo* pContactInfo) {} // - virtual void onRequestAddContact(const EB_AccountInfo* pAccountInfo,const EB_APMsgInfo* pApMsgInfo) {} // 用户申请加为好友 - virtual void onRejectAddContact(const EB_AccountInfo* pAccountInfo,const EB_APMsgInfo* pApMsgInfo) {} // 对方拒绝加为好友 - virtual void onAcceptAddContact(const EB_ContactInfo* pContactInfo) {} // 加为好友成功 - virtual void onContactStateChange(const EB_ContactInfo* pContactInfo) {} // 修改在线状态 - - // 在线资源(云盘) - virtual void onResourceInfo(const EB_ResourceInfo* pResourceInfo) {} // - virtual void onResourceDelete(const EB_ResourceInfo* pResourceInfo) {} // - virtual void onResourceMove(const EB_ResourceInfo* pResourceInfo,eb::bigint sOldParentResId) {} // - - virtual void onBroadcastMsg(const EB_AccountInfo* pAccountInfo,const EB_APMsgInfo* pApMsgInfo) {} // 收到一条广播消息 - virtual void onAreaInfo(const EB_AreaInfo* pAreaInfo,unsigned int nParameter) {} // 收到地区资料消息 - - virtual void onNewVersion(const EB_VersionInfo& pVersionInfo) {} // 有新版本需要更新 - typedef enum SERVER_STATE - { - SERVER_UNKNOWN // 其他状态 - , SERVER_STOPED // 服务器停止、维护状态中,提示用户 - , SERVER_MOVED // 服务器业务已经转移,需要重新登录 - , SERVER_RESTART // 服务器已经重启,需要重新登录 - , SERVER_TIMEOUT // 服务器连接超时,有可能是本地网络问题 - }SERVER_STATE; - virtual void onServerChange(SERVER_STATE nServerState) {} // 服务器状态改变 - virtual void onStateCode(EB_STATE_CODE nStateCode, unsigned long nParam) {} // 错误状态码 -}; - -#ifdef EB_SERVER -#define WM_USER 0 -#endif -#ifndef WM_USER -#define WM_USER 0 -#endif - -typedef enum EB_WINDOW_MESSAGE_TYPE -{ - EB_WM_UNKNOWN = 0 - , EB_WM_APPID_SUCCESS = WM_USER+0x101 - - // EB_STATE_CODE nState = (EB_STATE_CODE)wp; - , EB_WM_APPID_ERROR - - // EB_STATE_CODE nState = (EB_STATE_CODE)wp; - , EB_WM_LOGON_APPCENTER - , EB_WM_LOGOUT_APPCENTER - - // const EB_APMsgInfo* pAPMsgInfo = (const EB_APMsgInfo*)wp; - , EB_WM_AP_MSG - - // EB_STATE_CODE nState = (EB_STATE_CODE)wp; - // const char* pUserId = (const chat*)lp; - , EB_WM_REGISTER_RESPONSE - - // EB_STATE_CODE nState = (EB_STATE_CODE)wp; - // int nFlag = (int)lp; - , EB_WM_EDITINFO_RESPONSE - - // const EB_MemberInfo* pMemberInfo = (const EB_MemberInfo*)wp; - // bool bIsOwnerMember = (bool)(lp==1); - , EB_WM_USER_STATE_CHANGE - , EB_WM_USER_HEAD_CHANGE - - // const char* sOAuthUrl = (const char*)wp; - , EB_WM_OAUTH_FORWARD - - // const EB_AccountInfo* pAccountInfo = (const EB_AccountInfo*)wp; - , EB_WM_LOGON_SUCCESS - , EB_WM_LOGON_TIMEOUT - - // const EB_AccountInfo* pAccountInfo = (const EB_AccountInfo*)wp; - // EB_STATE_CODE nState = (EB_STATE_CODE)lp; - , EB_WM_LOGON_ERROR - - , EB_WM_ONLINE_ANOTHER - , EB_WM_LOGOUT - // const EB_AccountInfo* pAccountInfo = (const EB_AccountInfo*)wp; - , EB_WM_ACCOUNT_INFO_CHANGE - - // const EB_ContactInfo* pContactInfo = (const EB_ContactInfo*)wp; - , EB_WM_CONTACT_HEAD_CHANGE - - /*========================================================== - 会话 - ===========================================================*/ - // const EB_CallInfo* pCallInfo = (const EB_CallInfo*)wp; - // const EB_AccountInfo* pFromAccount = (const EB_AccountInfo*)lp; - , EB_WM_CALL_INCOMING = WM_USER+0x201 - // const EB_CallInfo* pCallInfo = (const EB_CallInfo*)wp; - , EB_WM_CALL_ALERTING - , EB_WM_CALL_BUSY - // const EB_CallInfo* pCallInfo = (const EB_CallInfo*)wp; - // bool bOwner = (bool)(lp==1); - , EB_WM_CALL_HANGUP - // const EB_CallInfo* pCallInfo = (const EB_CallInfo*)wp; - // EB_STATE_CODE nState = (EB_STATE_CODE)lp; - , EB_WM_CALL_ERROR - // const EB_CallInfo* pCallInfo = (const EB_CallInfo*)wp; - // int nConnectFlag = (int)lp; - , EB_WM_CALL_CONNECTED - - /*========================================================== - 视频 - ===========================================================*/ - // const EB_VideoInfo* pVideoInfo = (const EB_VideoInfo*)wp; - // EB_STATE_CODE nState = (EB_STATE_CODE)lp; - , EB_WM_V_REQUEST_RESPONSE = WM_USER+0x211 - , EB_WM_V_ACK_RESPONSE - - // const EB_VideoInfo* pVideoInfo = (const EB_VideoInfo*)wp; - // const EB_UserVideoInfo* pUserVideoInfo = (const EB_UserVideoInfo*)lp; - , EB_WM_VIDEO_REQUEST - , EB_WM_VIDEO_ACCEPT - , EB_WM_VIDEO_REJECT - , EB_WM_VIDEO_TIMEOUT - , EB_WM_VIDEO_CLOSE - - /*========================================================== - 视频 - ===========================================================*/ - // const EB_RemoteDesktopInfo* pRemoteDesktopInfo = (const EB_RemoteDesktopInfo*)wp; - // EB_STATE_CODE nState = (EB_STATE_CODE)lp; - , EB_WM_RD_REQUEST_RESPONSE = WM_USER+0x221 - , EB_WM_RD_ACK_RESPONSE - - // const EB_RemoteDesktopInfo* pRemoteDesktopInfo = (const EB_RemoteDesktopInfo*)wp; - , EB_WM_RD_REQUEST - , EB_WM_RD_ACCEPT - , EB_WM_RD_REJECT - , EB_WM_RD_CLOSE - - /*========================================================== - 组织结构 - ===========================================================*/ - // const EB_EnterpriseInfo* pEnterpriseInfo = (const EB_EnterpriseInfo*)wp; - , EB_WM_ENTERPRISE_INFO = WM_USER+0x301 - - // const EB_GroupInfo* pGroupInfo = (const EB_GroupInfo*)wp; - // bool bIsMyGroup = (bool)(lp==1); - , EB_WM_GROUP_INFO - , EB_WM_GROUP_DELETE - // const EB_GroupInfo* pGroupInfo = (const EB_GroupInfo*)wp; - // EB_STATE_CODE nState = (EB_STATE_CODE)lp; - , EB_WM_GROUP_EDIT_ERROR - - // const EB_GroupInfo* pGroupInfo = (const EB_GroupInfo*)wp; - // const EB_MemberInfo* pMemberInfo = (const EB_MemberInfo*)lp; - , EB_WM_REMOVE_GROUP - , EB_WM_EXIT_GROUP - - // const EB_AccountInfo* pAccountInfo = (const EB_AccountInfo*)wp; - // const EB_APMsgInfo* pApMsgInfo = (const EB_APMsgInfo*)lp; - , EB_WM_REQUEST_ADD2GROUP - , EB_WM_INVITE_ADD2GROUP - , EB_WM_REJECT_ADD2GROUP - - // const EB_MemberInfo* pMemberInfo = (const EB_MemberInfo*)wp; - // bool bIsMyDefaultMember = (bool)(lp==1); - , EB_WM_MEMBER_INFO - , EB_WM_MEMBER_DELETE - // const EB_MemberInfo* pMemberInfo = (const EB_MemberInfo*)wp; - // EB_STATE_CODE nState = (EB_STATE_CODE)lp; - , EB_WM_MEMBER_EDIT_ERROR - // const EB_AccountInfo* pAccountInfo = (const EB_AccountInfo*)wp; - // const EB_APMsgInfo* pApMsgInfo = (const EB_APMsgInfo*)lp; - , EB_WM_REQUEST_ADDCONTACT - , EB_WM_REJECT_ADDCONTACT - // const EB_ContactInfo* pContactInfo = (const EB_ContactInfo*)wp; - , EB_WM_ACCEPT_ADDCONTACT - - /*========================================================== - 通讯录(联系人) - ===========================================================*/ - // const EB_ContactInfo* pContactInfo = (const EB_ContactInfo*)wp; - , EB_WM_CONTACT_INFO = WM_USER+0x311 - , EB_WM_CONTACT_DELETE - - // const EB_ResourceInfo* pResourceInfo = (const EB_ResourceInfo*)wp; - , EB_WM_RESOURCE_INFO - , EB_WM_RESOURCE_DELETE - // const EB_ResourceInfo* pResourceInfo = (const EB_ResourceInfo*)wp; - // const char* sOldParentResId = (const char*)lp; - , EB_WM_RESOURCE_MOVE - - // const EB_UGInfo* pUGInfo = (const EB_UGInfo*)wp; - , EB_WM_UG_INFO - , EB_WM_UG_DELETE - - // const EB_ContactInfo* pContactInfo = (const EB_ContactInfo*)wp; - , EB_WM_CONTACT_STATE_CHANGE - - // const EB_AccountInfo* pAccountInfo = (const EB_AccountInfo*)wp; - // const EB_APMsgInfo* pApMsgInfo = (const EB_APMsgInfo*)lp; - , EB_WM_BROADCAST_MSG = WM_USER+0x321 - - // const EB_AreaInfo* pAreaInfo = (const EB_AreaInfo*)wp; - // unsigned int nParameter = (unsigned int)lp; - , EB_WM_AREA_INFO - - // const EB_VersionInfo* pNewVersionInfo = (const EB_VersionInfo*)wp; - , EB_WM_NEW_VERSION = WM_USER+0x401 - - // SERVER_STATE nServerState = (SERVER_STATE)wp; - , EB_WM_SERVER_CHENGE = WM_USER+0x411 - // EB_STATE_CODE nState = (EB_STATE_CODE)wp; - , EB_WM_STATE_CODE - , EB_WM_SUBSCRIBE_FUNC_INFO = WM_USER+0x501 - -}EB_WINDOW_MESSAGE_TYPE; - -} // namespace entboost - -#endif // __EBCallbackInterface_h__ diff --git a/src/ebclib/include/EBParseSetting.h b/src/ebclib/include/EBParseSetting.h deleted file mode 100644 index 230f981..0000000 --- a/src/ebclib/include/EBParseSetting.h +++ /dev/null @@ -1,58 +0,0 @@ -// EBParseSetting.h file here -#ifndef __EBParseSetting_h__ -#define __EBParseSetting_h__ -#ifdef WIN32 -#pragma warning(disable:4819) -#endif -#include - -#ifdef EB_APPCLIENT_EXPORTS -#define EB_EBPARSESETTING_API __declspec(dllexport) -#else // EB_APPCLIENT_EXPORTS -#define EB_EBPARSESETTING_API __declspec(dllimport) -#endif // EB_APPCLIENT_EXPORTS - -namespace entboost { - -class EB_EBPARSESETTING_API CEBParseSetting -{ -public: - CEBParseSetting(void); - virtual ~CEBParseSetting(void); - static std::string str_convert(const char * strSource, int sourceCodepage, int targetCodepage); -public: - bool load(const char* filename); - - //const std::string & GetBaseKey(void) const {return m_sBaseKey;} - const std::string & GetCallKey(void) const {return m_sCallKey;} - const std::string & GetServerAddress(void) const {return m_sServerAddress;} - //unsigned int GetLocalPort(void) const {return m_nLocalPort;} - COLORREF GetDefaultColor(void) const {return m_nDefaultColor;} - const std::string& GetVersion(void) const {return m_sVersion;} - int GetSDKVersion(void) const {return m_nSDKVersion;} - int GetDefaultUIStyleType(void) const {return m_nDefaultUIStyleType;} // 0:office; 1:chat(default) - - const std::string& GetEnterprise(void) const {return m_sEnterprise;} - const std::string& GetLoginText(void) const {return m_sLoginText;} - -private: - //void InsertTitle(const boost::property_tree::ptree::value_type & v); - -private: - //std::string m_sBaseKey; - std::string m_sCallKey; - std::string m_sServerAddress; - //unsigned int m_nLocalPort; - COLORREF m_nDefaultColor; - std::string m_sVersion; - int m_nSDKVersion; - // login - std::string m_sEnterprise; - std::string m_sLoginText; - int m_nDefaultUIStyleType; // 0:offiace; 1:chat(default) -}; -//extern CEBParseSetting theSetting; - -} // namespace entboost - -#endif // __EBParseSetting_h__ diff --git a/src/ebclib/include/chatroomhandle.h b/src/ebclib/include/chatroomhandle.h deleted file mode 100644 index 5047d9d..0000000 --- a/src/ebclib/include/chatroomhandle.h +++ /dev/null @@ -1,535 +0,0 @@ -// charroomhandle.h file here -#ifndef __charroomhandle_h__ -#define __charroomhandle_h__ - -#ifdef CHATROOM_EXPORTS -#define CHATROOM_API __declspec(dllexport) -#else -#define CHATROOM_API __declspec(dllimport) -#endif - -#include -#include "chatroomobject.h" - -namespace entboost { - -class CCrInfo -{ -public: - CCrInfo(void) - : m_nParam(0) - , m_sCallId(0), m_sChatId(0) - , m_nState(EB_STATE_OK) - { - } - CCrInfo(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId,EB_STATE_CODE nState) - : m_nParam(nParam) - , m_sCallId(sCallId), m_sChatId(sChatId) - , m_nState(nState) - { - } - CCrInfo(const CCrInfo& pObj) - { - CCrInfo::operator=(pObj); - } - const CCrInfo& operator =(const CCrInfo& pParameter) - { - CCrInfo::operator =(&pParameter); - return *this; - } - const CCrInfo& operator =(const CCrInfo* pParameter) - { - if (pParameter!=NULL) - { - m_nParam = pParameter->GetParam(); - m_sCallId = pParameter->GetCallId(); - m_sChatId = pParameter->GetChatId(); - m_nState = pParameter->GetStateCode(); - } - return *this; - } - unsigned long GetParam(void) const {return m_nParam;} - void SetParam(unsigned long v) {m_nParam = v;} - cr::bigint GetCallId(void) const {return m_sCallId;} - void SetCallId(cr::bigint v) {m_sCallId = v;} - cr::bigint GetChatId() const {return m_sChatId;} - void SetChatId(cr::bigint v) {m_sChatId = v;} - void SetStateCode(EB_STATE_CODE nState) {m_nState = nState;} - EB_STATE_CODE GetStateCode(void) const {return m_nState;} - -protected: - unsigned long m_nParam; - cr::bigint m_sCallId; - cr::bigint m_sChatId; - EB_STATE_CODE m_nState; -}; - -//class CChatRoomFileInfo -// : public CCrInfo -//{ -//public: -// CChatRoomFileInfo(void) -// : m_nFileSize(0) -// //, m_bIsMsgSender(false) -// , m_bOffFile(false) -// { -// } -// CChatRoomFileInfo(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId) -// : CCrInfo(nParam,sCallId,sChatId) -// , m_nFileSize(0) -// , m_bOffFile(false) -// { -// } -// const CChatRoomFileInfo & operator =(const CChatRoomFileInfo * pChatRoomFileInfo) -// { -// CCrInfo::operator =(pChatRoomFileInfo); -// m_sResId = pChatRoomFileInfo->m_sResId; -// m_nMsgId = pChatRoomFileInfo->m_nMsgId; -// m_sFileName = pChatRoomFileInfo->m_sFileName; -// m_nFileSize = pChatRoomFileInfo->m_nFileSize; -// //m_bIsMsgSender = pChatRoomFileInfo->m_bIsMsgSender; -// m_bOffFile = pChatRoomFileInfo->m_bOffFile; -// return *this; -// } -// -// CEBString m_sResId; -// CEBString m_sResCmServer; -// CEBString m_sResCmAppName; -// CEBString m_nMsgId; -// CEBString m_sFileName; -// unsigned int m_nFileSize; -// //bool m_bIsMsgSender; -// CEBString m_sFileTime; // null is current time -// bool m_bOffFile; -//}; - - -class CChatRoomFilePercent - : public CCrInfo -{ -public: - CChatRoomFilePercent(void) - : m_sResId(0),m_nMsgId(0) - , m_percent(0.0) - , m_nTranSeconds(0) - , m_nLeftSeconds(0) - , m_nCurSpeed(0) - , m_nAvrSpeed(0) - { - } - CChatRoomFilePercent(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId,EB_STATE_CODE nState) - : CCrInfo(nParam,sCallId,sChatId,nState) - , m_sResId(0),m_nMsgId(0) - , m_percent(0.0) - , m_nTranSeconds(0) - , m_nLeftSeconds(0) - , m_nCurSpeed(0) - , m_nAvrSpeed(0) - { - } - CChatRoomFilePercent(cr::bigint nMsgId, double percent, int nseconds1, int nseconds2, int speech1, int speech2) - : m_sResId(0),m_nMsgId(nMsgId) - , m_percent(percent) - , m_nTranSeconds(nseconds1) - , m_nLeftSeconds(nseconds2) - , m_nCurSpeed(speech1) - , m_nAvrSpeed(speech2) - { - } - CChatRoomFilePercent(const CChatRoomFilePercent& pObj) - { - CChatRoomFilePercent::operator=(pObj); - } - const CChatRoomFilePercent& operator=(const CChatRoomFilePercent& pObj) - { - CCrInfo::operator =(&pObj); - m_sResId = pObj.m_sResId; - m_nMsgId = pObj.m_nMsgId; - m_percent = pObj.m_percent; - m_nTranSeconds = pObj.m_nTranSeconds; - m_nLeftSeconds = pObj.m_nLeftSeconds; - m_nCurSpeed = pObj.m_nCurSpeed; - m_nAvrSpeed = pObj.m_nAvrSpeed; - return *this; - } - cr::bigint m_sResId; - cr::bigint m_nMsgId; - double m_percent; - int m_nTranSeconds; // 传输时间,单位秒 - int m_nLeftSeconds; // 剩余时间,单位秒 - int m_nCurSpeed; // 当前速度 1=1Byte - int m_nAvrSpeed; // 平均速度 -}; - -//class CChatRoomSendInfo -//{ -//public: -// CChatRoomSendInfo(void) -// : m_nPrivate(0) -// { -// } -// CChatRoomSendInfo(const CEBString& sFrom, const CEBString& sTo, int nPrivate) -// : m_sFrom(sFrom) -// , m_sTo(sTo) -// , m_nPrivate(nPrivate) -// { -// } -// -// CEBString m_sFrom; -// CEBString m_sTo; -// int m_nPrivate; -//}; - -class CCrFileInfo - : public CCrInfo -{ -public: - CCrFileInfo(void) - : m_sResId(0),m_nMsgId(0),m_nFileSize(0) - , m_bOffFile(false) - , m_sSendFrom(0), m_sSendTo(0) - , m_bPrivate(false) - , m_sReceiveAccount(0) - { - } - CCrFileInfo(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId,EB_STATE_CODE nState) - : CCrInfo(nParam,sCallId,sChatId,nState) - , m_sResId(0),m_nMsgId(0),m_nFileSize(0) - , m_bOffFile(false) - , m_sSendFrom(0), m_sSendTo(0) - , m_bPrivate(false) - , m_sReceiveAccount(0) - { - } - CCrFileInfo(const CCrFileInfo& pObj) - : m_sResId(0),m_nMsgId(0),m_nFileSize(0) - , m_bOffFile(false) - , m_sSendFrom(0), m_sSendTo(0) - , m_bPrivate(false) - , m_sReceiveAccount(0) - { - CCrFileInfo::operator=(pObj); - } -#ifdef USES_EBCOM_TEST - CCrFileInfo(IEB_ChatFileInfo* pObj) - : m_sResId(0),m_nMsgId(0),m_nFileSize(0) - , m_bOffFile(false) - , m_sSendFrom(0), m_sSendTo(0) - , m_bPrivate(false) - , m_sReceiveAccount(0) - { - CCrFileInfo::operator=(pObj); - } -#endif - const CCrFileInfo& operator=(const CCrFileInfo* pObj) - { - if (pObj!=NULL) - { - CCrFileInfo::operator =(*pObj); - } - return *this; - } - const CCrFileInfo& operator=(const CCrFileInfo& pObj) - { - CCrInfo::operator =(&pObj); - m_sResId = pObj.m_sResId; - m_sResCmServer = pObj.m_sResCmServer; - m_sResCmAppName = pObj.m_sResCmAppName; - m_nMsgId = pObj.m_nMsgId; - m_sFileName = pObj.m_sFileName; - m_nFileSize = pObj.m_nFileSize; - m_sFileTime = pObj.m_sFileTime; - m_bOffFile = pObj.m_bOffFile; - m_sSendFrom = pObj.m_sSendFrom; - m_sSendTo = pObj.m_sSendTo; - m_bPrivate = pObj.m_bPrivate; - m_sReceiveAccount = pObj.m_sReceiveAccount; - m_sMD5 = pObj.m_sMD5; - return *this; - } -#ifdef USES_EBCOM_TEST - const CCrFileInfo& operator=(IEB_ChatFileInfo* pObj) - { - if (pObj != NULL) - { - m_nParam = pObj->Param; - m_sCallId = pObj->CallId; - m_sChatId = pObj->ChatId; - m_sResId = pObj->ResId; - m_sResCmServer = pObj->ResCmServer.GetBSTR(); - m_sResCmAppName = pObj->ResCmAppName.GetBSTR(); - m_nMsgId = pObj->MsgId; - m_sFileName = pObj->FileName.GetBSTR(); - m_nFileSize = pObj->FileSize; - m_sFileTime = pObj->FileTime.GetBSTR(); - m_bOffFile = pObj->OffFile?true:false; - m_sSendFrom = pObj->SendFrom; - m_sSendTo = pObj->SendTo; - m_bPrivate = pObj->Private?true:false; - m_sReceiveAccount = pObj->ReceiveAccount; - m_sMD5 = pObj->MD5.GetBSTR(); - } - return *this; - } -#endif - //CEBString m_sChatId; - //CChatRoomFileInfo m_pFileInfo; - cr::bigint m_sResId; - CEBString m_sResCmServer; - CEBString m_sResCmAppName; - cr::bigint m_nMsgId; - CEBString m_sFileName; - cr::bigint m_nFileSize; - //bool m_bIsMsgSender; - CEBString m_sFileTime; // null is current time - bool m_bOffFile; - //CChatRoomSendInfo m_pSendInfo; - cr::bigint m_sSendFrom; - cr::bigint m_sSendTo; - bool m_bPrivate; - cr::bigint m_sReceiveAccount; - CEBString m_sMD5; -}; - -class CCrRichInfo - : public CCrInfo -{ -public: - CCrRichInfo(void) - : m_pRichMsg(NULL) - , m_sSendFrom(0), m_sSendTo(0) - , m_bPrivate(false) - { - } - CCrRichInfo(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId,EB_STATE_CODE nState) - : CCrInfo(nParam,sCallId,sChatId,nState) - , m_pRichMsg(NULL) - , m_sSendFrom(0), m_sSendTo(0) - , m_bPrivate(false) - { - } - CCrRichInfo(const CCrRichInfo& pObj) - { - CCrRichInfo::operator=(pObj); - } - const CCrRichInfo& operator=(const CCrRichInfo& pObj) - { - CCrInfo::operator=(&pObj); - m_pRichMsg = pObj.m_pRichMsg; - m_sSendFrom = pObj.m_sSendFrom; - m_sSendTo = pObj.m_sSendTo; - m_bPrivate = pObj.m_bPrivate; - return *this; - } - EB_ChatRoomRichMsg* m_pRichMsg; - //CChatRoomSendInfo m_pSendInfo; - cr::bigint m_sSendFrom; - cr::bigint m_sSendTo; - bool m_bPrivate; -}; - -class CCrAccountInfo - : public CCrInfo -{ -public: - CCrAccountInfo(void) - : m_sAccount(0) - , m_bOffLine(false) - { - } - CCrAccountInfo(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId,EB_STATE_CODE nState) - : CCrInfo(nParam,sCallId,sChatId,nState) - , m_sAccount(0) - , m_bOffLine(false) - { - } - CCrAccountInfo(const CCrAccountInfo& pObj) - : m_sAccount(0) - , m_bOffLine(false) - { - CCrAccountInfo::operator=(pObj); - } - const CCrAccountInfo& operator=(const CCrAccountInfo& pObj) - { - CCrInfo::operator=(&pObj); - m_sAccount = pObj.m_sAccount; - m_sFromInfo = pObj.m_sFromInfo; - m_bOffLine = pObj.m_bOffLine; - return *this; - } - cr::bigint m_sAccount; - CEBString m_sFromInfo; - bool m_bOffLine; -}; - -class CCrP2PInfo - : public CCrInfo -{ -public: - CCrP2PInfo(void) - : m_sFromAccount(0) - , m_nP2PData(0) - { - } - CCrP2PInfo(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId,EB_STATE_CODE nState) - : CCrInfo(nParam,sCallId,sChatId,nState) - , m_sFromAccount(0) - , m_nP2PData(0) - { - } - CCrP2PInfo(const CCrP2PInfo& pObj) - : m_sFromAccount(0) - , m_nP2PData(0) - { - CCrP2PInfo::operator=(pObj); - } - const CCrP2PInfo& operator=(const CCrP2PInfo& pObj) - { - CCrInfo::operator=(&pObj); - m_sFromAccount = pObj.m_sFromAccount; - m_sFromLocalAddress = pObj.m_sFromLocalAddress; - m_sFromRemoteAddress = pObj.m_sFromRemoteAddress; - m_nP2PData = pObj.m_nP2PData; - return *this; - } - cr::bigint m_sFromAccount; - CEBString m_sFromLocalAddress; - CEBString m_sFromRemoteAddress; - int m_nP2PData; -}; - -class CCrNotifyInfo - : public CCrInfo -{ -public: - CCrNotifyInfo(void) - : m_nFromAccount(0) - , m_nNotifyType(0) - , m_nNotityId(0) - { - } - CCrNotifyInfo(unsigned long nParam,cr::bigint sCallId,cr::bigint sChatId,EB_STATE_CODE nState) - : CCrInfo(nParam,sCallId,sChatId,nState) - , m_nFromAccount(0) - , m_nNotifyType(0) - , m_nNotityId(0) - { - } - CCrNotifyInfo(const CCrNotifyInfo& pObj) - : m_nFromAccount(0) - , m_nNotifyType(0) - , m_nNotityId(0) - { - CCrNotifyInfo::operator=(pObj); - } - const CCrNotifyInfo& operator=(const CCrNotifyInfo& pObj) - { - CCrInfo::operator=(&pObj); - m_nFromAccount = pObj.m_nFromAccount; - m_nNotifyType = pObj.m_nNotifyType; - m_nNotityId = pObj.m_nNotityId; - m_sNotifyData = pObj.m_sNotifyData; - return *this; - } - cr::bigint m_nFromAccount; - int m_nNotifyType; - cr::bigint m_nNotityId; - CEBString m_sNotifyData; -}; - -#ifdef EB_SERVER -#define WM_USER 0 -#endif -#ifndef WM_USER -#define WM_USER 0 -#endif -typedef enum CR_WINDOW_MESSAGE -{ - // const CCrInfo* pParameter = (const CCrInfo*)wp; - CR_WM_ENTER_ROOM = WM_USER+0x1101 - , CR_WM_EXIT_ROOM - /* - const CCrAccountInfo* pAccountInfo = (const CCrAccountInfo*)wParam; - */ - , CR_WM_USER_ENTER_ROOM - /* - const CCrAccountInfo* pAccountInfo = (const CCrAccountInfo*)wParam; - const int nHangup = (const int)lParam; - */ - , CR_WM_USER_EXIT_ROOM - // const CCrNotifyInfo* pNotifyInfo = (const CCrNotifyInfo*)wParam; - , CR_WM_USER_NOTIFY - /* - const CCrRichInfo * pRichInfo = (const CCrRichInfo*)wParam; - */ - , CR_WM_SEND_RICH = WM_USER+0x1111 - , CR_WM_RECEIVE_RICH - /* - const CCrFileInfo * pCrFileInfo = (const CCrFileInfo*)wParam; - */ - , CR_WM_SENDING_FILE - , CR_WM_SENT_FILE - , CR_WM_CANCEL_FILE - , CR_WM_RECEIVING_FILE - , CR_WM_RECEIVED_FILE - /* - const CChatRoomFilePercent * pChatRoomFilePercent = (const CChatRoomFilePercent*)wParam; - */ - , CR_WM_FILE_PERCENT - /* - const CCrRichInfo * pRichInfo = (const CCrRichInfo*)wParam; - */ - , CR_WM_MSG_RECEIPT - /* - const CCrFileInfo * pCrFileInfo = (const CCrFileInfo*)wParam; - */ - , CR_WM_SAVE2CLOUD_DRIVE = WM_USER+0x1121 - - ///* - //const char* sResourceId = (const char*)wParam; - //lParam: nParam or sParam - //*/ - //, CR_WM_SET_RESOURCE_OK = WM_USER+0x1121 - //, CR_WM_SET_RESOURCE_ERROR - // const CCrInfo* pParameter = (const CCrInfo*)wp; - , CR_WM_INVALIDATE_SESSION = WM_USER+0x1131 - , CR_WM_ENTER_ANOTHER - - // const CCrP2PInfo* pP2PInfo = (const CCrP2PInfo*)wp; - , CR_WM_P2P_REQUEST = WM_USER+0x1141 - , CR_WM_P2P_RESPONSE - , CR_WM_P2P_OK -}CR_WINDOW_MESSAGE; - -// If MFC error use CR_WINDOW_MESSAGE. -class CChatRoomCallBack -{ -public: - virtual void OnEnterRoom(const CCrInfo& pParameter) {} - virtual void OnExitRoom(const CCrInfo& pParameter) {} - virtual void OnUserEnterRoom(const CCrAccountInfo& pAccountInfo) {} - virtual void OnUserExitRoom(const CCrAccountInfo& pAccountInfo, bool bHangup) =0; - virtual void OnUserNotify(const CCrNotifyInfo& pNotifyInfo) =0; - - virtual void OnSendRich(const CCrRichInfo& pRichInfo) {} - virtual int OnReceiveRich(const CCrRichInfo& pRichInfo) {return 0;} - virtual void OnMsgReceipt(const CCrRichInfo& pRichInfo, int nAckType) {} - virtual void OnSendingFile(const CCrFileInfo& pFileInfo) {} - virtual void OnSentFile(const CCrFileInfo& pFileInfo) {} - virtual void OnCancelFile(const CCrFileInfo& pFileInfo) {} - virtual int OnReceivingFile(const CCrFileInfo& pFileInfo) {return 0;} - virtual void OnReceivedFile(const CCrFileInfo& pFileInfo) {} - virtual void OnFilePercent(const CChatRoomFilePercent& pFilePercent) {} - virtual void OnSave2CloudDrive(const CCrFileInfo& pFileInfo) {} - - virtual void OnInvalidateSession(const CCrInfo& pParameter) =0; - virtual void OnEnterAnother(const CCrInfo& pParameter) =0; - - virtual void OnP2PRequest(const CCrP2PInfo& pP2PInfo) =0; - virtual void OnP2PResponse(const CCrP2PInfo& pP2PInfo,int nFlag) =0; - virtual void OnP2POk(const CCrP2PInfo& pP2PInfo) =0; -}; - -} // namespace entboost - -#endif // __charroomhandle_h__ diff --git a/src/ebclib/include/chatroomobject.h b/src/ebclib/include/chatroomobject.h deleted file mode 100644 index c2f5dbf..0000000 --- a/src/ebclib/include/chatroomobject.h +++ /dev/null @@ -1,267 +0,0 @@ -// chatroomobject.h file here -#ifndef __chatroomobject_h__ -#define __chatroomobject_h__ - -#include -//#include "ebstring.h" -#include - -namespace entboost { -namespace cr { - -#ifdef WIN32 - typedef __int64 bigint; -#define cr_atoi64(a) _atoi64(a) -#else - typedef long long bigint; -#define cr_atoi64(a) atoll(a) -#endif -} // namespace cr - -class EB_ChatRoomMsgItem -{ -public: - enum MsgItemType - { - MIT_TEXT - , MIT_CHARFORMAT - , MIT_OBJECT - , MIT_RESOURCE - }; - - EB_ChatRoomMsgItem(void) - : m_type(MIT_TEXT) - , m_data(NULL), m_size(0) - {} - EB_ChatRoomMsgItem(const CEBString & text) - : m_type(MIT_TEXT) - , m_text(text) - , m_data(NULL), m_size(0) - {} - EB_ChatRoomMsgItem(const char * text) - : m_type(MIT_TEXT) - , m_text(text) - , m_data(NULL), m_size(0) - {} - EB_ChatRoomMsgItem(char * data, unsigned long size, MsgItemType type = MIT_OBJECT) - : m_type(type) - , m_text("") - , m_data(data), m_size(size) - {} - EB_ChatRoomMsgItem(const EB_ChatRoomMsgItem& pItem) - : m_data(NULL) - { - EB_ChatRoomMsgItem::operator =(pItem); - } - const EB_ChatRoomMsgItem& operator =(const EB_ChatRoomMsgItem& pItem) - { - clear(); - m_type = pItem.GetType(); - m_text = pItem.GetText(); - m_size = pItem.GetSize(); - if (m_size > 0) - { - m_data = new char[m_size+1]; - memset(m_data,0,m_size+1); - } - if (pItem.GetData() != NULL) - { - memcpy(m_data,pItem.GetData(),m_size); - } - return *this; - } - - virtual ~EB_ChatRoomMsgItem(void) - { - clear(); - } - void SetType(MsgItemType type) {m_type = type;} - MsgItemType GetType(void) const {return m_type;} - void SetText(const char * value) {m_text = value;} - void SetText(const CEBString& value) {m_text = value;} - const CEBString & GetText(void) const {return m_text;} - const char * GetData(void) const {return m_data;} - void SetSize(unsigned long size) // 先生成内存 - { - if (m_size < size) - { - clear(); - } - m_size = size; - if (m_size > 0 && m_data == NULL) - { - m_data = new char[m_size+1]; - memset(m_data,0,m_size+1); - } - } - unsigned long GetSize(void) const {return m_size;} - void SetData(const char * data) // 再填充数据 - { - if (m_size > 0 && m_data != NULL) - { - memcpy(m_data,data,m_size); - } - } - void UpdateData(char * data, unsigned long size) - { - if (m_size == size && m_data == NULL) - m_data = data; - } - -private: - void clear(void) - { - m_size = 0; - if (m_data) - { - delete []m_data; - m_data = NULL; - } - } -private: - MsgItemType m_type; - CEBString m_text; // text or object filename - char * m_data; - unsigned long m_size; -}; - -// CHARFORMAT effects -#ifndef CFE_BOLD -#define CFE_BOLD 0x0001 -#endif -#ifndef CFE_ITALIC -#define CFE_ITALIC 0x0002 -#endif -#ifndef CFE_UNDERLINE -#define CFE_UNDERLINE 0x0004 -#endif -#ifndef CFE_STRIKEOUT -#define CFE_STRIKEOUT 0x0008 -#endif -#ifndef CFE_PROTECTED -#define CFE_PROTECTED 0x0010 -#endif -#ifndef CFE_LINK -#define CFE_LINK 0x0020 -#endif -typedef struct _cr_charformat -{ - unsigned long dwEffects; - long yHeight; - unsigned long crTextColor; - char szFaceName[32]; -} CR_CHARFORMATA; -#define CR_CHARFORMATA_SIZE sizeof(CR_CHARFORMATA) - -class EB_ChatRoomRichMsg -{ -public: - const EB_ChatRoomMsgItem* AddText(const char * sText) - { - if (sText != NULL && strlen(sText) > 0) - { - EB_ChatRoomMsgItem* pMsgItem = new EB_ChatRoomMsgItem(sText); - m_list.push_back(pMsgItem); - return pMsgItem; - } - return NULL; - } - const EB_ChatRoomMsgItem* AddResource(const char * sResourceId) - { - if (sResourceId != NULL && strlen(sResourceId) > 0) - { - EB_ChatRoomMsgItem* pMsgItem = new EB_ChatRoomMsgItem(sResourceId); - pMsgItem->SetType(EB_ChatRoomMsgItem::MIT_RESOURCE); - m_list.push_back(pMsgItem); - return pMsgItem; - } - return NULL; - } - const EB_ChatRoomMsgItem* AddObject(char * lpData, unsigned long nSize)//, EB_ChatRoomMsgItem::MsgItemType type = EB_ChatRoomMsgItem::MIT_OBJECT) - { - if (lpData != NULL && nSize > 0) - { - EB_ChatRoomMsgItem::MsgItemType type = EB_ChatRoomMsgItem::MIT_OBJECT; - EB_ChatRoomMsgItem* pMsgItem = new EB_ChatRoomMsgItem(lpData, nSize, type); - m_list.push_back(pMsgItem); - return pMsgItem; - } - return NULL; - } - - const EB_ChatRoomMsgItem* GetMsgItem(size_t nIndex) - { - if (nIndex >= 0 && nIndex < m_list.size()) - { - return m_list[nIndex]; - } - return NULL; - } - - bool IsInvalidateCharFormat(void) const {return (bool)(m_charFormat.GetType() == EB_ChatRoomMsgItem::MIT_CHARFORMAT && m_charFormat.GetSize()==CR_CHARFORMATA_SIZE);} - void SetCharFormat(const EB_ChatRoomMsgItem& pCharFormat) {m_charFormat=pCharFormat;} - const EB_ChatRoomMsgItem& GetCharFormat(void) const {return m_charFormat;} - - bool IsEmpty(void) const {return m_list.empty();} - const std::vector & GetList(void) const {return m_list;} - void SetMsgId(eb::bigint nMsgId) {m_nMsgId=nMsgId;} - eb::bigint GetMsgId(void) const {return m_nMsgId;} - void SetSubType(int v) {m_nSubType = v;} - int GetSubType(void) const {return m_nSubType;} - - //bool m_bOffLineMsg; - CEBString m_sMsgTime; // null is current time - EB_ChatRoomRichMsg(eb::bigint nMsgId) - : m_nMsgId(nMsgId) - , m_nSubType(0) - { - } - EB_ChatRoomRichMsg(void) - : m_nMsgId(0) - , m_nSubType(0) - {} - EB_ChatRoomRichMsg(const EB_ChatRoomRichMsg& pRichMsg) - : m_nMsgId(0) - , m_nSubType(0) - { - EB_ChatRoomRichMsg::operator =(pRichMsg); - } - const EB_ChatRoomRichMsg& operator =(const EB_ChatRoomRichMsg& pRichMsg) - { - clear(); - //m_bOffLineMsg = pRichMsg.m_bOffLineMsg; - m_sMsgTime = pRichMsg.m_sMsgTime; - m_nMsgId = pRichMsg.GetMsgId(); - m_nSubType = pRichMsg.GetSubType(); - m_charFormat = pRichMsg.GetCharFormat(); - const std::vector & pList = pRichMsg.GetList(); - for (size_t i=0; i m_list; - EB_ChatRoomMsgItem m_charFormat; - int m_nSubType; -}; - -} // namespace entboost - -#endif // __chatroomobject_h__ - diff --git a/src/ebclib/include/eb_define.h b/src/ebclib/include/eb_define.h deleted file mode 100644 index cc453cf..0000000 --- a/src/ebclib/include/eb_define.h +++ /dev/null @@ -1,418 +0,0 @@ -// eb_define.h file here -#ifndef __eb_define_h__ -#define __eb_define_h__ -#ifdef WIN32 -#include "Windows.h" -#endif // WIN32 - -namespace entboost { - -#ifndef min -#define min(a, b) (((a) < (b)) ? (a) : (b)) -#endif // min -namespace eb -{ -#ifdef WIN32 - typedef __int64 bigint; -#define eb_atoi64(a) _atoi64(a) -#define eb_sprintfi64(a,i64) sprintf(a,"%I64d",i64) -#else - typedef long long bigint; -#define eb_atoi64(a) atoll(a) -#define eb_sprintfi64(a,i64) sprintf(a,"%lld",i64) -#endif -} // cgc namespace - - -/*========================================================== -部门群组扩展数据 -===========================================================*/ -typedef enum EB_GROUP_EXT_DATA -{ - EB_GROUP_EXT_DATA_NULL - , EB_GROUP_EXT_DATA_FORBID_SPEECH = 0x1 // 禁言群组(部门) -}EB_GROUP_EXT_DATA; - -/*========================================================== -企业扩展数据 -===========================================================*/ -typedef enum EB_ENT_EXT_DATA -{ - EB_ENT_EXT_DATA_NULL - , EB_ENT_EXT_DATA_ENABLE_MODIFY_MEMBER_INFO = 0x1 // 允许员工修改自己部门资料 - , EB_ENT_EXT_DATA_DISABLE_MODIFY_ACCOUNT_INFO = 0x2 // 允许员工修改自己个人资料 -}EB_ENT_EXT_DATA; - -/*========================================================== -系统参数 -===========================================================*/ -typedef enum EB_SYSTEM_PARAMETER -{ - EB_SYSTEM_PARAMETER_UNKNOWN - , EB_SYSTEM_PARAMETER_ACCOUNT_PREFIX // 1 char* - , EB_SYSTEM_PARAMETER_OPEN_REGISTER // 2 int - , EB_SYSTEM_PARAMETER_OPEN_VISITOR // 3 int - , EB_SYSTEM_PARAMETER_LICENSE_USER // 4 int 0/1 - , EB_SYSTEM_PARAMETER_FORGET_PWD_URL // 5 char* - , EB_SYSTEM_PARAMETER_ENT_LOGO_URL // 6 char* - , EB_SYSTEM_PARAMETER_SEND_REG_MAIL // 7 int 0/1 - , EB_SYSTEM_PARAMETER_DEPLOY_ID // 8 char* - , EB_SYSTEM_PARAMETER_PRODUCT_NAME // 9 char* - , EB_SYSTEM_PARAMETER_ENT_MANAGER_URL // 10 char* - , EB_SYSTEM_PARAMETER_SAVE_CONVERSATIONS // 11 int 0/1 - , EB_SYSTEM_PARAMETER_GROUP_MSG_SUBID // 12 char* - , EB_SYSTEM_PARAMETER_FIND_APP_SUBID // 13 char* - , EB_SYSTEM_PARAMETER_AUTH_CONTACT // 14 int 0/1 - , EB_SYSTEM_PARAMETER_AUTH_INVITEADD2GROUP // 15 int 0/1 - , EB_SYSTEM_PARAMETER_REGISTER_URL // 16 char* - , EB_SYSTEM_PARAMETER_AUTO_OPEN_SUBID // 17 char* - , EB_SYSTEM_PARAMETER_AUTOHIDE_MAINFRAME // 18 int 0/1 - , EB_SYSTEM_PARAMETER_HIDE_MAINFRAME // 19 int 0/1 - , EB_SYSTEM_PARAMETER_DISABLE_USER_CLOUD_DRIVE // 20 int 0/1 - , EB_SYSTEM_PARAMETER_DISABLE_GROUP_SHARED_CLOUD // 21 int 0/1 - , EB_SYSTEM_PARAMETER_DISABLE_MODIFY_PASSWD // 22 int 0/1 - , EB_SYSTEM_PARAMETER_LOGON_HTTP_REQ_URL // 23 char* - , EB_SYSTEM_PARAMETER_DISABLE_VIDEO // 24 int 0/1 - , EB_SYSTEM_PARAMETER_DISABLE_REMOTE_DESKTOP // 25 int 0/1 - , EB_SYSTEM_PARAMETER_DISABLE_ACCOUNT_EDIT // 26 int 0/1 - , EB_SYSTEM_PARAMETER_DEFAULT_BROWSER_TYPE // 27 int 0=谷歌Chrome浏览器 1=微软IE浏览器 - , EB_SYSTEM_PARAMETER_LOGON_USER_DATA // 28 char* set only - , EB_SYSTEM_PARAMETER_DISABLE_MSG_RECEIPT // 29 int 0/1 - , EB_SYSTEM_PARAMETER_LICENSE_TYPE // 30 int 许可类型;0=未授权;1=终身授权;2=时间授权 - , EB_SYSTEM_PARAMETER_STAT_SUB_GROUP_MEMBER // 31 int 是否统计子部门人数 0/1 - , EB_SYSTEM_PARAMETER_MY_COLLECTION_SUBID // 32 char* - , EB_SYSTEM_PARAMETER_EB_SERVER_VERSION // 33 int 当前服务端版本,如 544=1.25.0.544 544以上版本开始支持 - , EB_SYSTEM_PARAMETER_DEFAULT_URL // 34 char* - , EB_SYSTEM_PARAMETER_SYSTEM_ACCOUNT_FLAG // 35 int 系统帐号标示,1=系统管理员;2=普通企业管理员;0=普通用户 -}EB_SYSTEM_PARAMETER; - -/*========================================================== -FUNC BROWSER TYPE -===========================================================*/ -typedef enum EB_FUNC_BROWSER_TYPE -{ - EB_FUNC_BROWSER_TYPE_DEFAULT - , EB_FUNC_BROWSER_TYPE_CEF - , EB_FUNC_BROWSER_TYPE_IE -}EB_FUNC_BROWSER_TYPE; - -/*========================================================== -RICH SUB TYPE -===========================================================*/ -typedef enum EB_RICH_SUB_TYPE -{ - EB_RICH_SUB_TYPE_JPG // 默认内容(或JPG截图) - , EB_RICH_SUB_TYPE_AUDIO = 11 // 语音消息 - , EB_RICH_SUB_TYPE_MAP_POS = 21 // 地图位置 - , EB_RICH_SUB_TYPE_CARD_INFO // 名片信息,如用户名片 - , EB_RICH_SUB_TYPE_USER_DATA = 200 // 用户自定义数据 -}EB_RICH_SUB_TYPE; - -/*========================================================== -RICH SUB TYPE -===========================================================*/ -typedef enum EB_BROADCAST_SUB_TYPE -{ - EB_BROADCAST_SUB_TYPE_BC - , EB_BROADCAST_SUB_TYPE_NEW_EMAIL - , EB_BROADCAST_SUB_TYPE_UNREAD_EMAIL - , EB_BROADCAST_SUB_TYPE_TW_MSG // 协同办公提醒消息 - , EB_BROADCAST_SUB_TYPE_SUBID_UNREAD_MSG // 订购ID,未读消息;content格式: [订购ID],[未读消息数量],例如: "1002300105,3" 表示 1002300105 该订购ID,有3条未读消息; -}EB_BROADCAST_SUB_TYPE; - -/*========================================================== -应用功能显示位置 -===========================================================*/ -typedef enum EB_FUNC_LOCATION -{ - EB_FUNC_LOCATION_UNKNOWN = 0x0 - , EB_FUNC_LOCATION_MAINFRAME_BTN1 = 0x0001 // 主界面按钮(上) - , EB_FUNC_LOCATION_MAINFRAME_BTN2 = 0x0002 // 主界面按钮(下) - , EB_FUNC_LOCATION_PHONE_APPFRAME = 0x0004 // 手机应用(应用面板按钮) - , EB_FUNC_LOCATION_APPFRAME_BTN = 0x0008 // 应用面板按钮 - , EB_FUNC_LOCATION_RIGHT_CLICK_MENU_MAINFRAME = 0x0010 // 主界面右键菜单 - , EB_FUNC_LOCATION_RIGHT_CLICK_MENU_USER = 0x0020 // 用户右键菜单 - , EB_FUNC_LOCATION_RIGHT_CLICK_MENU_GROUP = 0x0040 // 群组(部门)右键菜单 - , EB_FUNC_LOCATION_RIGHT_CLICK_MENU_ENTERPRISE = 0x0080 // 企业右键菜单 - , EB_FUNC_LOCATION_GROUP_CHAT_BTN1 = 0x0100 // 群组会话上面按钮 - , EB_FUNC_LOCATION_GROUP_CHAT_BTN2 = 0x0200 // 群组会话下面按钮 - , EB_FUNC_LOCATION_USER_CHAT_BTN1 = 0x0400 // 用户会话上面按钮 - , EB_FUNC_LOCATION_USER_CHAT_BTN2 = 0x0800 // 用户会话下面按钮 - , EB_FUNC_LOCATION_CALL_CHAT = EB_FUNC_LOCATION_GROUP_CHAT_BTN1|EB_FUNC_LOCATION_GROUP_CHAT_BTN2|EB_FUNC_LOCATION_USER_CHAT_BTN1|EB_FUNC_LOCATION_USER_CHAT_BTN2 - , EB_FUNC_LOCATION_RIGHT_CLICK_MENU_USER_CHAT = 0x1000 // 个人聊天界面右键菜单 - , EB_FUNC_LOCATION_RIGHT_CLICK_MENU_GROUP_CHAT = 0x2000 // 群组聊天界面右键菜单 - , EB_FUNC_LOCATION_RIGHT_CLICK_MENU_CHAT_RECORD = 0x4000 // 聊天记录右键菜单 - , EB_FUNC_LOCATION_ALL_RIGHT_CLICK_MENU_CHAT = EB_FUNC_LOCATION_RIGHT_CLICK_MENU_USER_CHAT|EB_FUNC_LOCATION_RIGHT_CLICK_MENU_GROUP_CHAT|EB_FUNC_LOCATION_RIGHT_CLICK_MENU_CHAT_RECORD - , EB_FUNC_LOCATION_CHAT_COPY_TEXT_TOOLBAR = 0x8000 // 聊天窗口复制文本工具栏 - , EB_FUNC_LOCATION_DISABLE_PC = 0x10000 // 禁用PC端 -}EB_FUNC_LOCATION; - -/*========================================================== -应用功能模式 -===========================================================*/ -typedef enum EB_FUNC_MODE -{ - EB_FUNC_MODE_BROWSER // 浏览器模式 - , EB_FUNC_MODE_MAINFRAME // 主面板(默认) - , EB_FUNC_MODE_MODAL // 对话框模式(模式) - , EB_FUNC_MODE_PROGRAM // 打开应用程序 - , EB_FUNC_MODE_SERVER // 服务模式(HTTP POST) - , EB_FUNC_MODE_WINDOW // 窗口模式(无模式) -}EB_FUNC_MODE; - -/*========================================================== -应用功能参数 -===========================================================*/ -typedef enum EB_FUNC_PARAM -{ - EB_FUNC_PARAM_NONE // 没有参数 - , EB_FUNC_PARAM_EB_DEFAULT // 恩布默认参数,authid&fk&ums - , EB_FUNC_PARAM_USER_INFO // 用户信息,uid&account -}EB_FUNC_PARAM; - -/*========================================================== -会话连接标识 -===========================================================*/ -typedef enum EB_CONNECTED_FLAG -{ - EB_CONNECTED_NORMAL = 0x000 - , EB_CONNECTED_OFFLINE_USER = 0x001 - , EB_CONNECTED_OWNER_CALL = 0x002 - , EB_CONNECTED_AUTO_ACK = 0x004 - , EB_CONNECTED_MSG = 0x008 -}EB_CONNECTED_FLAG; - -/*========================================================== -资源类型 -===========================================================*/ -typedef enum EB_RESOURCE_TYPE -{ - EB_RESOURCE_UNKNOWN - , EB_RESOURCE_NOTE // 文本笔记 - , EB_RESOURCE_MSG // 消息资源 rich&image need cm - , EB_RESOURCE_HEAD // 头像资源 need cm - , EB_RESOURCE_DIR // 目录资源 - , EB_RESOURCE_FILE // 文件资源 need cm - , EB_RESOURCE_EMOTION // 表情资源 - , EB_RESOURCE_FUNCICON // 应用功能图标 - , EB_RESOURCE_CONTENT // 内容(如邮件content-id附件) -}EB_RESOURCE_TYPE; -/*========================================================== -资源共享类型 -===========================================================*/ -typedef enum EB_RESOURCE_SHARE_TYPE -{ - EB_RESOURCE_SHARE_UNKNOWN - , EB_RESOURCE_SHARE_ALL // 共享资源 - , EB_RESOURCE_SHARE_TEMP // 群组临时文件 - , EB_RESOURCE_SHARE_COMMENT // 计划、任务等评论附件 -}EB_RESOURCE_SHARE_TYPE; -/*========================================================== -文件扩展类型 -===========================================================*/ -typedef enum EB_FILE_EXT_TYPE -{ - EB_FILE_EXT_TYPE_OTHER - , EB_FILE_EXT_TYPE_PDF - , EB_FILE_EXT_TYPE_IMAGE - , EB_FILE_EXT_TYPE_OFFICE -}EB_FILE_EXT_TYPE; -/*========================================================== -资源来源类型 -===========================================================*/ -typedef enum EB_RESOURCE_FROM_TYPE -{ - EB_RESOURCE_FROM_TYPE_UNKNOWN = 0 - , EB_RESOURCE_FROM_TYPE_ENT - , EB_RESOURCE_FROM_TYPE_GROUP - , EB_RESOURCE_FROM_TYPE_USER - , EB_RESOURCE_FROM_TYPE_OFFMSG - , EB_RESOURCE_FROM_TYPE_FUNC = 10 - , EB_RESOURCE_FROM_TYPE_PLAN = 11 - , EB_RESOURCE_FROM_TYPE_TASK - , EB_RESOURCE_FROM_TYPE_REPORT - , EB_RESOURCE_FROM_TYPE_MCON_ID_ATT = 20 - -}EB_RESOURCE_FROM_TYPE; - - -/*========================================================== -视频类型 -===========================================================*/ -typedef enum EB_VIDEO_TYPE -{ - EB_VIDEO_UNKNOWN = 0 // 未知 - , EB_VIDEO_AUDIO = 1 // 语音 - , EB_VIDEO_BOTH = 2 // 语音&视频 -}EB_VIDEO_TYPE; - -/*========================================================== -远程桌面类型 -===========================================================*/ -typedef enum EB_REMOTE_DESKTOP_TYPE -{ - EB_RD_UNKNOWN = 0 // 未知 - , EB_RD_DESKTOP_SRC = 1 // 申请共享本端桌面 - , EB_RD_DESKTOP_DEST = 2 // 申请共享对方桌面 -}EB_REMOTE_DESKTOP_TYPE; - -/*========================================================== -性别 -===========================================================*/ -typedef enum EB_GENDER_TYPE -{ - EB_GENDER_UNKNOWN - , EB_GENDER_MALE // 男性 - , EB_GENDER_FEMALE // 女性 -}EB_GENDER_TYPE; - -/*========================================================== -群组类型 -===========================================================*/ -typedef enum EB_GROUP_TYPE -{ - EB_GROUP_TYPE_DEPARTMENT // 企业部门 (由公司人员设定,不能随意添加用户,或退出) - , EB_GROUP_TYPE_PROJECT // 项目组 (同上) - , EB_GROUP_TYPE_GROUP // 固定群组 (所有人可以创建,管理员随时添加成员,或退出) - , EB_GROUP_TYPE_TEMP = 9 // 临时讨论组 (由聊天成员动态创建,所有人随时添加成员,或退出) -}EB_GROUP_TYPE; - -/*========================================================== -在线状态 -===========================================================*/ -typedef enum EB_USER_LINE_STATE -{ - EB_LINE_STATE_FREEZE = -1 // 帐号临时冻结 - , EB_LINE_STATE_UNKNOWN = 0 // 帐号未验证 - , EB_LINE_STATE_ONLINE_OLD // 在线 - , EB_LINE_STATE_OFFLINE // 离线 - , EB_LINE_STATE_BUSY // 忙 - , EB_LINE_STATE_AWAY // 离开 - , EB_LINE_STATE_ONLINE_NEW // 在线 - , EB_USER_CHANGE_STATE = 0x100 -}EB_USER_LINE_STATE; - -/*========================================================== -状态码 -===========================================================*/ -typedef enum EB_STATE_CODE -{ - EB_STATE_OK = 0 - , EB_STATE_ERROR = 1 - , EB_STATE_NOT_AUTH_ERROR // 没有权限 - , EB_STATE_ACC_PWD_ERROR // 帐号或密码错误 - , EB_STATE_NEED_RESEND // 需要重发数据 - , EB_STATE_TIMEOUT_ERROR // 超时错误 - , EB_STATE_EXIST_OFFLINE_MSG // 存在离线消息 - , EB_STATE_USER_OFFLINE // 用户离线状况 - , EB_STATE_USER_BUSY // 用户线路忙 - , EB_STATE_USER_HANGUP // 用户挂断会话 - , EB_STATE_OAUTH_FORWARD // OAUTH转发 - , EB_STATE_UNAUTH_ERROR // 未验证错误 - , EB_STATE_ACCOUNT_FREEZE // 帐号已经冻结 - , EB_STATE_NEED_DELETE_MSG // 13 需要删除消息 - , EB_STATE_WAITING_PROCESS // 14 等待处理(消息) - , EB_STATE_PARAMETER_ERROR = 15 // 参数错误 - , EB_STATE_DATABASE_ERROR // 数据库操作错误 - , EB_STATE_NEW_VERSION // 新版本 - , EB_STATE_FILE_ALREADY_EXIST // 文件已经存在 - , EB_STATE_FILE_BIG_LONG // 文件超过大小 - , EB_STATE_ACCOUNT_NOT_EXIST = 20 // 帐号不存在 - , EB_STATE_ACCOUNT_ALREADY_EXIST // 帐号已经存在 - , EB_STATE_ACCOUNT_DISABLE_OFFCALL // 禁止离线会话 - , EB_STATE_ACCOUNT_DISABLE_EXTCALL // 禁止外部会话 - , EB_STATE_DISABLE_REGISTER_USER = 25 // 禁止用户注册功能 - , EB_STATE_DISABLE_REGISTER_ENT // 禁止企业注册功能 - , EB_STATE_ENTERPRISE_ALREADY_EXIST = 30 // 公司名称已经存在 - , EB_STATE_ENTERPRISE_NOT_EXIST // 没有公司信息(企业不存在) - , EB_STATE_DEP_NOT_EXIST // 不存在群组(部门) - , EB_STATE_EXIST_SUB_DEPARTMENT // 存在子部门 - , EB_STATE_DEP_ACC_ERROR // 群组或成员不存在 - , EB_STATE_ENT_ACC_ERROR // 企业员工成员不存在 - , EB_STATE_CS_MAX_ERROR // 超过客服座席最大数量 - , EB_STATE_NOT_CS_ERROR // 没有客服座席 - , EB_STATE_EXCESS_QUOTA_ERROR // 超过最大流量配额 - , EB_STATE_ENT_GROUP_ERROR // 企业部门 - , EB_STATE_ONLINE_KEY_ERROR = 40 - , EB_STATE_UM_KEY_ERROR - , EB_STATE_CM_KEY_ERROR - , EB_STATE_DEVID_KEY_ERROR - , EB_STATE_APPID_KEY_ERROR - , EB_STATE_DEVID_NOT_EXIST - , EB_STATE_APPID_NOT_EXIST - , EB_STATE_APP_ONLINE_KEY_TIMEOUT - , EB_STATE_KEY_ERROR // KEY错误 - , EB_STATE_CALL_NOT_EXIST = 50 - , EB_STATE_CHAT_NOT_EXIST - , EB_STATE_MSG_NOT_EXIST - , EB_STATE_RES_NOT_EXIST - , EB_STATE_NOT_MEMBER_ERROR - , EB_STATE_ATTACHMENT_NOT_EXIST - , EB_STATE_FILE_NOT_EXIST - , EB_STATE_NO_UM_SERVER = 60 - , EB_STATE_NO_CM_SERVER - , EB_STATE_NO_VM_SERVER - , EB_STATE_NO_AP_SERVER - , EB_STATE_NO_RD_SERVER - , EB_STATE_ENT_BLACKLIST = 70 // 70 企业黑名单用户 - , EB_STATE_ANOTHER_ENT_ACCOUNT // 71 其他企业帐号 - , EB_STATE_MAX_CAPACITY_ERROR // 72 最大容量错误 - , EB_STATE_NOT_SUPPORT_VERSION_ERROR // 73 不支持当前版本 - , EB_STATE_FORWARD_MSG // 74 转发消息 - , EB_STATE_MAX_RETRY_ERROR // 75 错误次数太多,请三十分钟后再试! - , EB_STATE_TOKEN_ERROR // 76 TOKEN错误 - , EB_STATE_MAX_UG_ERROR // 77 超过最大分组数量 - , EB_STATE_MAX_CONTACT_ERROR // 78 超过最大联系人数量 - , EB_STATE_CONTACT_NOT_EXIST // 79 联系人不存在 - , EB_STATE_PHONE_ALREADY_EXIST // 80 手机帐号已经存在 - , EB_STATE_ALREADY_IN_REMOTE_DESKTOP // 81 已经在远程桌面中 - , EB_STATE_CONTENT_BIG_LENGTH // 82 内容超过长度 - , EB_STATE_MEMORY_ERROR // 83 内存不够 - , EB_STATE_DATA_ERROR // 84 数据或格式错误 - , EB_STATE_CREATE_FILE_ERROR // 85 创建文件失败 - , EB_STATE_FORBIG_SPEECH // 86 禁言限制 - , EB_STATE_GROUP_FORBIG_SPEECH // 87 群禁言限制 - , EB_STATE_ID_NOT_EXIST // 88 ID或编号不存在 - - , EB_STATE_PLAN_NOT_EXIST = 100 // 100 计划不存在 - , EB_STATE_TASK_NOT_EXIST // 101 任务不存在 - , EB_STATE_REPORT_NOT_EXIST // 102 报告不存在 - -}EB_STATE_CODE; - -/*========================================================== -用户类型 -===========================================================*/ -typedef enum EB_ACCOUNT_TYPE -{ - EB_ACCOUNT_TYPE_VISITOR // 游客 - , EB_ACCOUNT_TYPE_IN_ENT // 同企业或同群组 - , EB_ACCOUNT_TYPE_OUT_ENT // 外部成员 - , EB_ACCOUNT_TYPE_USER // 普通用户 -}EB_ACCOUNT_TYPE; - -/*========================================================== -个人设置 -===========================================================*/ -typedef enum EB_SETTING_VALUE -{ - EB_SETTING_ENABLE_OUTENT_CALL = 0x0001 - , EB_SETTING_AUTO_OUTENT_ACCEPT = 0x0002 - , EB_SETTING_ENABLE_USER_CALL = 0x0004 - , EB_SETTING_AUTO_USER_ACCEPT = 0x0008 - , EB_SETTING_ENABLE_VISITOR_CALL = 0x0010 - , EB_SETTING_AUTO_VISITOR_ACCEPT = 0x0020 - , EB_SETTING_ENABLE_OFF_CALL = 0x0040 - , EB_SETTING_ENABLE_OFF_FILE = 0x0080 - //, EB_SETTING_CONNECTED_OPEN_CHAT = 0x0100 - , EB_SETTING_AUTO_CONTACT_ACCEPT = 0x0200 -}EB_SETTING_VALUE; -//(EB_SETTING_ENABLE_OUTENT_CALL|EB_SETTING_AUTO_OUTENT_ACCEPT|EB_SETTING_ENABLE_USER_CALL|EB_SETTING_AUTO_USER_ACCEPT|EB_SETTING_ENABLE_VISITOR_CALL|EB_SETTING_AUTO_VISITOR_ACCEPT|EB_SETTING_ENABLE_OFF_CALL) -#define EB_SETTING_DEFAULT 0x027F // EB_SETTING_ENABLE_OUTENT_CALL-EB_SETTING_ENABLE_OFF_CALL -#define EB_SETTING_DEFAULT_BASE EB_SETTING_AUTO_CONTACT_ACCEPT -#define EB_SETTING_DEFAULT_OUT_CALL EB_SETTING_ENABLE_OUTENT_CALL|EB_SETTING_ENABLE_USER_CALL|EB_SETTING_ENABLE_VISITOR_CALL|EB_SETTING_ENABLE_OFF_CALL -#define EB_SETTING_DEFAULT_OUT_ACCEPT EB_SETTING_AUTO_OUTENT_ACCEPT|EB_SETTING_AUTO_USER_ACCEPT|EB_SETTING_AUTO_VISITOR_ACCEPT - -} // namespace entboost - -#endif // __eb_define_h__ diff --git a/src/ebclib/include/eb_object.h b/src/ebclib/include/eb_object.h deleted file mode 100644 index 243c2fc..0000000 --- a/src/ebclib/include/eb_object.h +++ /dev/null @@ -1,1613 +0,0 @@ -// eb_object.h file here -#ifndef __eb_object_h__ -#define __eb_object_h__ - -//#include -#include -//#include "ebstring.h" -#include "time.h" -#include "eb_define.h" -#ifndef CEBString -#define CEBString tstring -#endif - -namespace entboost { - -/*========================================================== -APP应用信息 -===========================================================*/ -class EB_AreaInfo -{ -public: - int m_nAreaCode; - int m_nParentCode; - CEBString m_sAreaName; - CEBString m_sAreaDigit; - - EB_AreaInfo(void) - : m_nAreaCode(0),m_nParentCode(0) - {} - EB_AreaInfo(int nParent) - : m_nAreaCode(0),m_nParentCode(nParent) - {} - EB_AreaInfo(const EB_AreaInfo* pObj) - : m_nAreaCode(0),m_nParentCode(0) - { - if (pObj!=NULL) - EB_AreaInfo::operator =(*pObj); - } -#ifdef USES_EBCOM_TEST - EB_AreaInfo(IEB_AreaInfo* pObj) - : m_nAreaCode(0),m_nParentCode(0) - { - EB_AreaInfo::operator =(pObj); - } -#endif - EB_AreaInfo(const EB_AreaInfo& pObj) - : m_nAreaCode(0),m_nParentCode(0) - { - EB_AreaInfo::operator =(pObj); - } - - const EB_AreaInfo& operator=(const EB_AreaInfo& pObj) - { - m_nAreaCode = pObj.m_nAreaCode; - m_nParentCode = pObj.m_nParentCode; - m_sAreaName = pObj.m_sAreaName; - m_sAreaDigit = pObj.m_sAreaDigit; - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_AreaInfo& operator=(IEB_AreaInfo* pAreaInfo) - { - if (pAreaInfo!=NULL) - { - m_nAreaCode = pAreaInfo->AreaCode; - m_nParentCode = pAreaInfo->ParentCode; - m_sAreaName = pAreaInfo->AreaName.GetBSTR(); - m_sAreaDigit = pAreaInfo->AreaDigit.GetBSTR(); - } - return *this; - } -#endif -}; - -/*========================================================== -APP应用信息 -===========================================================*/ -class EB_APMsgInfo -{ -public: - eb::bigint m_sFromAppId; - eb::bigint m_sFromUserId; - eb::bigint m_nGroupId; - eb::bigint m_nUserId; - CEBString m_sAccount; - eb::bigint m_nMsgId; - eb::bigint m_nMsgType; - CEBString m_sMsgName; - CEBString m_sMsgContent; - CEBString m_sMsgTime; // 空为当前时间 - eb::bigint m_nExtData; - - EB_APMsgInfo(void) - : m_sFromAppId(0),m_sFromUserId(0),m_nGroupId(0),m_nUserId(0) - , m_nMsgId(0),m_nMsgType(0),m_nExtData(0) - { - } - EB_APMsgInfo(const EB_APMsgInfo* pObj) - : m_sFromAppId(0),m_sFromUserId(0),m_nGroupId(0),m_nUserId(0) - , m_nMsgId(0),m_nMsgType(0),m_nExtData(0) - { - if (pObj!=NULL) - EB_APMsgInfo::operator =(*pObj); - } - EB_APMsgInfo(const EB_APMsgInfo& pObj) - : m_sFromAppId(0),m_sFromUserId(0),m_nGroupId(0),m_nUserId(0) - , m_nMsgId(0),m_nMsgType(0) - { - EB_APMsgInfo::operator =(pObj); - } -#ifdef USES_EBCOM_TEST - EB_APMsgInfo(IEB_APMsgInfo* pObj) - : m_sFromAppId(0),m_sFromUserId(0),m_nGroupId(0),m_nUserId(0) - , m_nMsgId(0),m_nMsgType(0) - { - EB_APMsgInfo::operator =(pObj); - } -#endif - const EB_APMsgInfo& operator=(const EB_APMsgInfo& pObj) {return this->operator =(&pObj);} - const EB_APMsgInfo& operator=(const EB_APMsgInfo* pObj) - { - if (pObj!=NULL) - { - m_sFromAppId = pObj->m_sFromAppId; - m_sFromUserId = pObj->m_sFromUserId; - m_nGroupId = pObj->m_nGroupId; - m_nUserId = pObj->m_nUserId; - m_sAccount = pObj->m_sAccount; - m_nMsgId = pObj->m_nMsgId; - m_nMsgType = pObj->m_nMsgType; - m_sMsgName = pObj->m_sMsgName; - m_sMsgContent = pObj->m_sMsgContent; - m_sMsgTime = pObj->m_sMsgTime; - m_nExtData = pObj->m_nExtData; - } - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_APMsgInfo& operator=(IEB_APMsgInfo* pObj) - { - if (pObj!=NULL) - { - m_sFromAppId = pObj->FromAppId; - m_sFromUserId = pObj->FromUserId; - m_nGroupId = pObj->GroupId; - m_nUserId = pObj->UserId; - m_sAccount = pObj->Account.GetBSTR(); - m_nMsgId = pObj->MsgId; - m_nMsgType = pObj->MsgType; - m_sMsgName = pObj->MsgName.GetBSTR(); - m_sMsgContent = pObj->MsgContent.GetBSTR(); - m_sMsgTime = pObj->MsgTime.GetBSTR(); - m_nExtData = pObj->ExtData; - } - return *this; - } -#endif -}; - -/*========================================================== -在线资源信息 -===========================================================*/ -class EB_ResourceInfo -{ -public: - eb::bigint m_sResId; - eb::bigint m_sParentResId; - CEBString m_sName; - EB_RESOURCE_TYPE m_nResType; - CEBString m_sDescription; - eb::bigint m_nFromId; - EB_RESOURCE_FROM_TYPE m_nFromType; - //eb::bigint m_sEnterpriseCode; - //eb::bigint m_sGroupCode; - //CEBString m_sCreator; - eb::bigint m_nCreateUserId; - CEBString m_sTime; - CEBString m_sDeleteTime; - unsigned int m_nDownloads; - eb::bigint m_nSize; - EB_RESOURCE_SHARE_TYPE m_nShare; - CEBString m_sOnlineViewUrl; - EB_FILE_EXT_TYPE m_nViewExtType; - - EB_ResourceInfo(void) - : m_sResId(0),m_sParentResId(0),m_nResType(EB_RESOURCE_UNKNOWN) - , m_nFromId(0), m_nFromType(EB_RESOURCE_FROM_TYPE_UNKNOWN) - //, m_sEnterpriseCode(0) - //, m_sGroupCode(0) - , m_nCreateUserId(0) - , m_nDownloads(0) - , m_nSize(0) - , m_nShare(EB_RESOURCE_SHARE_UNKNOWN) - , m_nViewExtType(EB_FILE_EXT_TYPE_OTHER) - { - } - EB_ResourceInfo(const EB_ResourceInfo* pObj) - : m_sResId(0),m_sParentResId(0),m_nResType(EB_RESOURCE_UNKNOWN) - , m_nFromId(0), m_nFromType(EB_RESOURCE_FROM_TYPE_UNKNOWN) - //, m_sEnterpriseCode(0) - //, m_sGroupCode(0) - , m_nCreateUserId(0) - , m_nDownloads(0) - , m_nSize(0) - , m_nShare(EB_RESOURCE_SHARE_UNKNOWN) - , m_nViewExtType(EB_FILE_EXT_TYPE_OTHER) - { - if (pObj!=NULL) - EB_ResourceInfo::operator =(*pObj); - } - EB_ResourceInfo(const EB_ResourceInfo& pObj) - : m_sResId(0),m_sParentResId(0),m_nResType(EB_RESOURCE_UNKNOWN) - { - EB_ResourceInfo::operator =(pObj); - } - const EB_ResourceInfo& operator=(const EB_ResourceInfo& pObj) - { - m_sResId = pObj.m_sResId; - m_sParentResId = pObj.m_sParentResId; - m_sName = pObj.m_sName; - m_nResType = pObj.m_nResType; - m_sDescription = pObj.m_sDescription; - m_nFromId = pObj.m_nFromId; - m_nFromType = pObj.m_nFromType; - //m_sEnterpriseCode = pObj.m_sEnterpriseCode; - //m_sGroupCode = pObj.m_sGroupCode; - //m_sCreator = pObj.m_sCreator; - m_nCreateUserId = pObj.m_nCreateUserId; - m_sTime = pObj.m_sTime; - m_sDeleteTime = pObj.m_sDeleteTime; - m_nDownloads = pObj.m_nDownloads; - m_nSize = pObj.m_nSize; - m_nShare = pObj.m_nShare; - m_sOnlineViewUrl = pObj.m_sOnlineViewUrl; - m_nViewExtType = pObj.m_nViewExtType; - return *this; - } -}; - -/*========================================================== -订购功能应用信息 -===========================================================*/ -class EB_SubscribeFuncInfo -{ -public: - eb::bigint m_nSubscribeId; - eb::bigint m_nFromSubscribeId; - //eb::bigint m_nFunctionId; - //int m_nSubscribeLevel; - int m_nLocation; - eb::bigint m_nIconResId; - CEBString m_sResFile; - CEBString m_sFunctionName; - CEBString m_sFunctionUrl; - EB_FUNC_MODE m_nFunctionMode; - int m_nWindowWidth; - int m_nWindowHeight; - bool m_bDisableContextMenu; - bool m_bDisableScrollBar; - bool m_bClosePrompt; - bool m_bWinResizable; - int m_nDisplayIndex; - EB_FUNC_BROWSER_TYPE m_nBrowserType; - CEBString m_sDescription; - - EB_SubscribeFuncInfo(void) - : m_nSubscribeId(0), m_nFromSubscribeId(0) - //, m_nFunctionId(0) - //, m_nSubscribeLevel(0) - , m_nLocation(0) - , m_nIconResId(0) - , m_nFunctionMode(EB_FUNC_MODE_BROWSER),m_nWindowWidth(0),m_nWindowHeight(0),m_bDisableContextMenu(true),m_bDisableScrollBar(false),m_bClosePrompt(true),m_bWinResizable(true) - , m_nDisplayIndex(0) - , m_nBrowserType(EB_FUNC_BROWSER_TYPE_DEFAULT) - { - } - EB_SubscribeFuncInfo(eb::bigint nSubscribeId) - : m_nSubscribeId(nSubscribeId), m_nFromSubscribeId(0) - //, m_nFunctionId(nFunctionId) - //, m_nSubscribeLevel(0) - , m_nLocation(0) - , m_nIconResId(0) - , m_nFunctionMode(EB_FUNC_MODE_BROWSER),m_nWindowWidth(0),m_nWindowHeight(0),m_bDisableContextMenu(true),m_bDisableScrollBar(false),m_bClosePrompt(true),m_bWinResizable(true) - , m_nDisplayIndex(0) - , m_nBrowserType(EB_FUNC_BROWSER_TYPE_DEFAULT) - { - } - EB_SubscribeFuncInfo(const EB_SubscribeFuncInfo& pObj) - { - EB_SubscribeFuncInfo::operator =(pObj); - } - EB_SubscribeFuncInfo(const EB_SubscribeFuncInfo* pObj) - : m_nSubscribeId(0), m_nFromSubscribeId(0) - //, m_nFunctionId(0) - //, m_nSubscribeLevel(0) - , m_nLocation(0) - , m_nIconResId(0) - , m_nFunctionMode(EB_FUNC_MODE_BROWSER),m_nWindowWidth(0),m_nWindowHeight(0),m_bDisableContextMenu(true),m_bDisableScrollBar(false),m_bClosePrompt(true),m_bWinResizable(true) - , m_nDisplayIndex(0) - , m_nBrowserType(EB_FUNC_BROWSER_TYPE_DEFAULT) - { - EB_SubscribeFuncInfo::operator =(pObj); - } -#ifdef USES_EBCOM_TEST - EB_SubscribeFuncInfo(IEB_SubscribeFuncInfo* pObj) - : m_nSubscribeId(0), m_nFromSubscribeId(0) - //, m_nFunctionId(0) - //, m_nSubscribeLevel(0) - , m_nLocation(0) - , m_nIconResId(0) - , m_nFunctionMode(EB_FUNC_MODE_BROWSER),m_nWindowWidth(0),m_nWindowHeight(0),m_bDisableContextMenu(true),m_bDisableScrollBar(false),m_bClosePrompt(true),m_bWinResizable(true) - , m_nDisplayIndex(0) - { - EB_SubscribeFuncInfo::operator =(pObj); - } -#endif - const EB_SubscribeFuncInfo& operator =(const EB_SubscribeFuncInfo* pObj) - { - if (pObj) - EB_SubscribeFuncInfo::operator =(*pObj); - return *this; - } - const EB_SubscribeFuncInfo& operator =(const EB_SubscribeFuncInfo& pObj) - { - m_nSubscribeId = pObj.m_nSubscribeId; - m_nFromSubscribeId = pObj.m_nFromSubscribeId; - //m_nFunctionId = pObj.m_nFunctionId; - //m_nSubscribeLevel = pObj.m_nSubscribeLevel; - m_nLocation = pObj.m_nLocation; - m_nIconResId = pObj.m_nIconResId; - m_sResFile = pObj.m_sResFile; - m_sFunctionName = pObj.m_sFunctionName; - m_sFunctionUrl = pObj.m_sFunctionUrl; - m_nFunctionMode = pObj.m_nFunctionMode; - m_nWindowWidth = pObj.m_nWindowWidth; - m_nWindowHeight = pObj.m_nWindowHeight; - m_bDisableContextMenu = pObj.m_bDisableContextMenu; - m_bDisableScrollBar = pObj.m_bDisableScrollBar; - m_bClosePrompt = pObj.m_bClosePrompt; - m_bWinResizable = pObj.m_bWinResizable; - m_nDisplayIndex = pObj.m_nDisplayIndex; - m_nBrowserType = pObj.m_nBrowserType; - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_SubscribeFuncInfo& operator =(IEB_SubscribeFuncInfo* pObj) - { - if (pObj != NULL) - { - m_nSubscribeId = pObj->SubscribeId; - m_nFromSubscribeId = pObj->FromSubscribeId; - m_nLocation = pObj->Location; - m_nIconResId = pObj->IconResId; - m_sResFile = pObj->ResFile.GetBSTR(); - m_sFunctionName = pObj->FuncName.GetBSTR(); - m_sFunctionUrl = pObj->FuncUrl.GetBSTR(); - m_nFunctionMode = (EB_FUNC_MODE)pObj->FuncMode; - m_nWindowWidth = pObj->WindowWidth; - m_nWindowHeight = pObj->WindowHeight; - m_bDisableContextMenu = pObj->DisableContextMenu==VARIANT_TRUE?true:false; - m_bDisableScrollBar = pObj->DisableScrollBar==VARIANT_TRUE?true:false; - m_bClosePrompt = pObj->ClosePrompt==VARIANT_TRUE?true:false; - m_bWinResizable = pObj->WinResizable==VARIANT_TRUE?true:false; - m_nDisplayIndex = pObj->DisplayIndex; - m_nBrowserType = pObj->BrowserType; - } - return *this; - } -#endif -}; - -/*========================================================== -表情信息/头像信息 -===========================================================*/ -class EB_EmotionInfo -{ -public: - eb::bigint m_sResId; - CEBString m_sResFile; - int m_nIndex; - int m_nType; - eb::bigint m_nUserId; - eb::bigint m_sEnterpriseCode; - //CEBString m_sAccount; - //CEBString m_sEnterpriseCode; // 空为个人表情 - EB_RESOURCE_TYPE m_nResType; - CEBString m_sDescription; - - EB_EmotionInfo(void) - : m_sResId(0),m_nIndex(0) - , m_nType(0) - , m_nUserId(0),m_sEnterpriseCode(0) - , m_nResType(EB_RESOURCE_UNKNOWN) - { - } - EB_EmotionInfo(eb::bigint sResId,int nIndex,int nType,eb::bigint sAccount,eb::bigint sEntCode,EB_RESOURCE_TYPE nResType) - : m_sResId(sResId) - , m_nIndex(nIndex) - , m_nType(nType) - , m_nUserId(sAccount), m_sEnterpriseCode(sEntCode) - , m_nResType(nResType) - { - } - EB_EmotionInfo(const EB_EmotionInfo& pObj) - : m_sResId(0),m_nIndex(0) - , m_nType(0) - , m_nUserId(0),m_sEnterpriseCode(0) - , m_nResType(EB_RESOURCE_UNKNOWN) - { - EB_EmotionInfo::operator =(pObj); - } - EB_EmotionInfo(const EB_EmotionInfo* pObj) - : m_sResId(0),m_nIndex(0) - , m_nType(0) - , m_nUserId(0),m_sEnterpriseCode(0) - , m_nResType(EB_RESOURCE_UNKNOWN) - { - EB_EmotionInfo::operator =(pObj); - } -#ifdef USES_EBCOM_TEST - EB_EmotionInfo(IEB_EmotionInfo* pObj) - : m_sResId(0),m_nIndex(0) - , m_nType(0) - , m_nUserId(0),m_sEnterpriseCode(0) - , m_nResType(EB_RESOURCE_UNKNOWN) - { - EB_EmotionInfo::operator =(pObj); - } -#endif - const EB_EmotionInfo& operator =(const EB_EmotionInfo* pObj) - { - if (pObj) - EB_EmotionInfo::operator =(*pObj); - return *this; - } - const EB_EmotionInfo& operator =(const EB_EmotionInfo& pObj) - { - m_sResId = pObj.m_sResId; - m_sResFile = pObj.m_sResFile; - m_nIndex = pObj.m_nIndex; - m_nType = pObj.m_nType; - m_nUserId = pObj.m_nUserId; - m_sEnterpriseCode = pObj.m_sEnterpriseCode; - m_nResType = pObj.m_nResType; - m_sDescription = pObj.m_sDescription; - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_EmotionInfo& operator =(IEB_EmotionInfo* pObj) - { - if (pObj != NULL) - { - m_sResId = pObj->ResId; - m_sResFile = pObj->ResFile.GetBSTR(); - m_nIndex = pObj->Index; - m_nType = pObj->Type; - m_nUserId = pObj->UserId; - m_sEnterpriseCode = pObj->EnterpriseCode; - m_nResType = (EB_RESOURCE_TYPE)pObj->ResType; - m_sDescription = pObj->Description.GetBSTR(); - } - return *this; - } -#endif -}; - -/*========================================================== -版本信息 -===========================================================*/ -class EB_VersionInfo -{ -public: - CEBString m_sVersion; // 版本号: x.x.x.x - CEBString m_sDescription; // 更新说明 - CEBString m_sDownloadUrl; // 下载链接地址 - CEBString m_sUpdateTime; // 更新时间 - int m_nUpdateType; // 更新类型 0:普通更新;1:强制更新(更新才能继续使用) - CEBString m_sVersionFile; // 打包文件 - eb::bigint m_sResId; - CEBString m_sMD5; - - EB_VersionInfo(void) - : m_nUpdateType(0) - , m_sResId(0) - { - } - EB_VersionInfo(const EB_VersionInfo& pVersionInfo) - : m_nUpdateType(0) - , m_sResId(0) - { - EB_VersionInfo::operator =(pVersionInfo); - } - const EB_VersionInfo& operator =(const EB_VersionInfo& pVersionInfo) - { - m_sVersion = pVersionInfo.m_sVersion; - m_sDescription = pVersionInfo.m_sDescription; - m_sDownloadUrl = pVersionInfo.m_sDownloadUrl; - m_sUpdateTime = pVersionInfo.m_sUpdateTime; - m_nUpdateType = pVersionInfo.m_nUpdateType; - m_sVersionFile = pVersionInfo.m_sVersionFile; - m_sResId = pVersionInfo.m_sResId; - return *this; - } -}; - -/*========================================================== -电子名片 -===========================================================*/ -class EB_ECardInfo -{ -public: - EB_ACCOUNT_TYPE m_nAccountType; - eb::bigint m_nMemberUserId; - eb::bigint m_sMemberCode; - //CEBString m_sMemberCode; - CEBString m_sAccountName; - CEBString m_sName; - CEBString m_sPhone; - CEBString m_sTel; - CEBString m_sEmail; - CEBString m_sTitle; - CEBString m_sGroupName; - eb::bigint m_sGroupCode; - //CEBString m_sGroupCode; - CEBString m_sEnterprise; - CEBString m_sAddress; - eb::bigint m_nUserSignId; - eb::bigint m_nFromIp; - eb::bigint m_nHeadResId; - eb::bigint m_nHeadVer; - CEBString m_sHeadCmServer; - CEBString m_sHeadHttpServer; - CEBString m_sHeadMd5; - CEBString m_sHeadResourceFile; - - EB_ECardInfo(void) - : m_nAccountType(EB_ACCOUNT_TYPE_VISITOR) - , m_nMemberUserId(0) - , m_sMemberCode(0) - , m_sGroupCode(0) - , m_nUserSignId(0),m_nFromIp(0) - , m_nHeadResId(0),m_nHeadVer(0) - { - } - EB_ECardInfo(const EB_ECardInfo& pECardInfo) - : m_nAccountType(EB_ACCOUNT_TYPE_VISITOR) - , m_nMemberUserId(0) - , m_sMemberCode(0) - , m_sGroupCode(0) - , m_nUserSignId(0),m_nFromIp(0) - , m_nHeadResId(0),m_nHeadVer(0) - { - EB_ECardInfo::operator = (pECardInfo); - } - const EB_ECardInfo& operator = (const EB_ECardInfo& pECardInfo) - { - EB_ECardInfo::operator =(&pECardInfo); - return *this; - } - const EB_ECardInfo& operator = (const EB_ECardInfo* pECardInfo) - { - if (pECardInfo) - { - m_nAccountType = pECardInfo->m_nAccountType; - m_nMemberUserId = pECardInfo->m_nMemberUserId; - m_sMemberCode = pECardInfo->m_sMemberCode; - m_sAccountName = pECardInfo->m_sAccountName; - m_sName = pECardInfo->m_sName; - m_sPhone = pECardInfo->m_sPhone; - m_sTel = pECardInfo->m_sTel; - m_sEmail = pECardInfo->m_sEmail; - m_sTitle = pECardInfo->m_sTitle; - m_sGroupName = pECardInfo->m_sGroupName; - m_sGroupCode = pECardInfo->m_sGroupCode; - m_sEnterprise = pECardInfo->m_sEnterprise; - m_sAddress = pECardInfo->m_sAddress; - m_nUserSignId = pECardInfo->m_nUserSignId; - m_nFromIp = pECardInfo->m_nFromIp; - m_nHeadResId = pECardInfo->m_nHeadResId; - m_nHeadVer = pECardInfo->m_nHeadVer; - m_sHeadCmServer = pECardInfo->m_sHeadCmServer; - m_sHeadHttpServer = pECardInfo->m_sHeadHttpServer; - m_sHeadMd5 = pECardInfo->m_sHeadMd5; - m_sHeadResourceFile = pECardInfo->m_sHeadResourceFile; - } - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_ECardInfo& operator = (IEB_ECardInfo* pECardInfo) - { - if (pECardInfo) - { - m_nAccountType = (EB_ACCOUNT_TYPE)pECardInfo->AccountType; - m_nMemberUserId = pECardInfo->MemberUserId; - m_sMemberCode = pECardInfo->MemberCode; - m_sAccountName = pECardInfo->AccountName.GetBSTR(); - m_sName = pECardInfo->Name.GetBSTR(); - m_sPhone = pECardInfo->Phone.GetBSTR(); - m_sTel = pECardInfo->Tel.GetBSTR(); - m_sEmail = pECardInfo->Email.GetBSTR(); - m_sTitle = pECardInfo->Title.GetBSTR(); - m_sGroupName = pECardInfo->GroupName.GetBSTR(); - m_sGroupCode = pECardInfo->GroupCode; - m_sEnterprise = pECardInfo->Enterprise.GetBSTR(); - m_sAddress = pECardInfo->Address.GetBSTR(); - m_nUserSignId = pECardInfo->UserSignId; - m_nFromIp = pECardInfo->FromIp; - m_nHeadResId = pECardInfo->HeadResId; - m_nHeadVer = pECardInfo->HeadVer; - m_sHeadCmServer = pECardInfo->HeadCmServer.GetBSTR(); - m_sHeadHttpServer = pECardInfo->HeadHttpServer.GetBSTR(); - m_sHeadMd5 = pECardInfo->HeadMd5.GetBSTR(); - m_sHeadResourceFile = pECardInfo->HeadResourceFile.GetBSTR(); - } - return *this; - } -#endif -}; - -/*========================================================== -群组(部门)成员信息 -===========================================================*/ -class EB_MemberInfo -{ -public: - EB_MemberInfo(void) - : m_sMemberCode(0), m_sGroupCode(0), m_nMemberUserId(0), m_nJobPosition(0) - , m_nManagerLevel(0) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - , m_nCSId(0),m_nCSExt(0) - , m_nDisplayIndex(0) - , m_nForbidMinutes(0) - {} - EB_MemberInfo(eb::bigint nGroupId, eb::bigint nMemberUserId) - : m_sMemberCode(0),m_sGroupCode(nGroupId) - , m_nMemberUserId(nMemberUserId) - , m_nJobPosition(0) - , m_nManagerLevel(0) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - , m_nCSId(0),m_nCSExt(0) - , m_nDisplayIndex(0) - , m_nForbidMinutes(0) - {} - EB_MemberInfo(const EB_MemberInfo* pMemberInfo) - : m_sMemberCode(0), m_sGroupCode(0), m_nMemberUserId(0), m_nJobPosition(0) - , m_nManagerLevel(0) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - , m_nCSId(0),m_nCSExt(0) - , m_nDisplayIndex(0) - , m_nForbidMinutes(0) - { - EB_MemberInfo::operator =(pMemberInfo); - } - EB_MemberInfo(const EB_MemberInfo& pMemberInfo) - : m_sMemberCode(0),m_sGroupCode(0),m_nMemberUserId(0), m_nJobPosition(0) - , m_nManagerLevel(0) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - , m_nCSId(0),m_nCSExt(0) - , m_nDisplayIndex(0) - , m_nForbidMinutes(0) - { - EB_MemberInfo::operator =(pMemberInfo); - } -#ifdef USES_EBCOM_TEST - EB_MemberInfo(IEB_MemberInfo* pMemberInfo) - : m_sMemberCode(0),m_sGroupCode(0),m_nMemberUserId(0), m_nJobPosition(0) - , m_nManagerLevel(0) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - , m_nCSId(0),m_nCSExt(0) - , m_nDisplayIndex(0) - , m_nForbidMinutes(0) - { - EB_MemberInfo::operator =(pMemberInfo); - } -#endif - const EB_MemberInfo& operator =(const EB_MemberInfo& pMemberInfo) - { - EB_MemberInfo::operator =(&pMemberInfo); - return *this; - } - const EB_MemberInfo& operator =(const EB_MemberInfo * pMemberInfo) - { - if (pMemberInfo) - { - m_sMemberCode = pMemberInfo->m_sMemberCode; - m_sGroupCode = pMemberInfo->m_sGroupCode; - m_nMemberUserId = pMemberInfo->m_nMemberUserId; - m_sMemberAccount = pMemberInfo->m_sMemberAccount; - m_sUserName = pMemberInfo->m_sUserName; - m_sJobTitle = pMemberInfo->m_sJobTitle; - m_nJobPosition = pMemberInfo->m_nJobPosition; - m_sCellPhone = pMemberInfo->m_sCellPhone; - m_sFax = pMemberInfo->m_sFax; - m_sWorkPhone = pMemberInfo->m_sWorkPhone; - m_sEmail = pMemberInfo->m_sEmail; - m_sAddress = pMemberInfo->m_sAddress; - m_sDescription = pMemberInfo->m_sDescription; - m_nManagerLevel = pMemberInfo->m_nManagerLevel; - m_nGender = pMemberInfo->m_nGender; - m_nBirthday = pMemberInfo->m_nBirthday; - m_nLineState = pMemberInfo->m_nLineState; - m_sHeadResourceId = pMemberInfo->m_sHeadResourceId; - m_sHeadResourceFile = pMemberInfo->m_sHeadResourceFile; - m_sHeadMd5 = pMemberInfo->m_sHeadMd5; - m_nCSId = pMemberInfo->m_nCSId; - m_nCSExt = pMemberInfo->m_nCSExt; - m_nDisplayIndex = pMemberInfo->m_nDisplayIndex; - m_nForbidMinutes = pMemberInfo->m_nForbidMinutes; - } - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_MemberInfo& operator =(IEB_MemberInfo * pMemberInfo) - { - if (pMemberInfo) - { - m_sMemberCode = pMemberInfo->MemberCode; - m_sGroupCode = pMemberInfo->GroupCode; - m_nMemberUserId = pMemberInfo->MemberUserId; - m_sMemberAccount = pMemberInfo->MemberAccount.GetBSTR(); - m_sUserName = pMemberInfo->UserName.GetBSTR(); - m_sJobTitle = pMemberInfo->JobTitle.GetBSTR(); - m_nJobPosition = pMemberInfo->JobPosition; - m_sCellPhone = pMemberInfo->CellPhone.GetBSTR(); - m_sFax = pMemberInfo->Fax.GetBSTR(); - m_sWorkPhone = pMemberInfo->WorkPhone.GetBSTR(); - m_sEmail = pMemberInfo->Email.GetBSTR(); - m_sAddress = pMemberInfo->Address.GetBSTR(); - m_sDescription = pMemberInfo->Description.GetBSTR(); - //m_nManagerLevel = pMemberInfo->ManagerLevel; - m_nGender = (EB_GENDER_TYPE)pMemberInfo->Gender; - m_nBirthday = pMemberInfo->Birthday; - m_nLineState = (EB_USER_LINE_STATE)pMemberInfo->LineState; - m_sHeadResourceId = pMemberInfo->HeadResourceId; - m_sHeadResourceFile = pMemberInfo->HeadResourceFile.GetBSTR(); - m_sHeadMd5 = pMemberInfo->HeadMd5.GetBSTR(); - m_nCSId = pMemberInfo->CSId; - m_nCSExt = pMemberInfo->CSExt; - m_nDisplayIndex = pMemberInfo->DisplayIndex; - m_nForbidMinutes = pMemberInfo->ForbidMinutes; - } - return *this; - } -#endif - void GetECardInfo(EB_ECardInfo* pOutCardInfo) const - { - if (pOutCardInfo!=NULL) - { - pOutCardInfo->m_nMemberUserId = m_nMemberUserId; - pOutCardInfo->m_sMemberCode = m_sMemberCode; - pOutCardInfo->m_sPhone = m_sCellPhone; - pOutCardInfo->m_sName = m_sUserName; - pOutCardInfo->m_sTel = m_sWorkPhone; - pOutCardInfo->m_sEmail = m_sEmail; - pOutCardInfo->m_sTitle = m_sJobTitle; - } - } - - eb::bigint m_sMemberCode; - eb::bigint m_sGroupCode; - //CEBString m_sMemberCode; - //CEBString m_sGroupCode; - eb::bigint m_nMemberUserId; - CEBString m_sMemberAccount; - CEBString m_sUserName; - CEBString m_sJobTitle; - int m_nJobPosition; - CEBString m_sCellPhone; - CEBString m_sFax; - CEBString m_sWorkPhone; - CEBString m_sEmail; - CEBString m_sAddress; - CEBString m_sDescription; - int m_nManagerLevel; - EB_GENDER_TYPE m_nGender; // 0:unknown 1:M 2:F - int m_nBirthday; // 19790101 - // account_t - EB_USER_LINE_STATE m_nLineState; - // - eb::bigint m_sHeadResourceId; - CEBString m_sHeadResourceFile; - CEBString m_sHeadMd5; - eb::bigint m_nCSId; - int m_nCSExt; - int m_nDisplayIndex; - int m_nForbidMinutes; -}; - -/*========================================================== -企业信息 -===========================================================*/ -class EB_EnterpriseInfo -{ -public: - EB_EnterpriseInfo(void) - : m_sEnterpriseCode(0),m_nCreateUserId(0) - , m_nEntExt(0) - {} - EB_EnterpriseInfo(eb::bigint nEnterpriseId, const CEBString& sEnterpriseName) - : m_sEnterpriseCode(nEnterpriseId) - , m_sEnterpriseName(sEnterpriseName), m_nCreateUserId(0) - , m_nEntExt(0) - {} - EB_EnterpriseInfo(const EB_EnterpriseInfo* pEnterpriseInfo) - : m_sEnterpriseCode(0),m_nCreateUserId(0) - , m_nEntExt(0) - { - EB_EnterpriseInfo::operator =(pEnterpriseInfo); - } - EB_EnterpriseInfo(const EB_EnterpriseInfo& pEnterpriseInfo) - : m_sEnterpriseCode(0),m_nCreateUserId(0) - , m_nEntExt(0) - { - EB_EnterpriseInfo::operator =(pEnterpriseInfo); - } - const EB_EnterpriseInfo& operator =(const EB_EnterpriseInfo* pEnterpriseInfo) - { - if (pEnterpriseInfo!=NULL) - { - EB_EnterpriseInfo::operator =(*pEnterpriseInfo); - } - return *this; - } - const EB_EnterpriseInfo& operator =(const EB_EnterpriseInfo& pEnterpriseInfo) - { - m_sEnterpriseCode = pEnterpriseInfo.m_sEnterpriseCode; - m_sEnterpriseName = pEnterpriseInfo.m_sEnterpriseName; - m_sDescription = pEnterpriseInfo.m_sDescription; - m_sPhone = pEnterpriseInfo.m_sPhone; - m_sFax = pEnterpriseInfo.m_sFax; - m_sEmail = pEnterpriseInfo.m_sEmail; - m_sUrl = pEnterpriseInfo.m_sUrl; - m_sAddress = pEnterpriseInfo.m_sAddress; - m_sCreateTime = pEnterpriseInfo.m_sCreateTime; - //m_sCreator = pEnterpriseInfo.m_sCreator; - m_nCreateUserId = pEnterpriseInfo.m_nCreateUserId; - m_nEntExt = pEnterpriseInfo.m_nEntExt; - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_EnterpriseInfo& operator =(IEB_EnterpriseInfo* pEnterpriseInfo) - { - if (pEnterpriseInfo != NULL) - { - m_sEnterpriseCode = pEnterpriseInfo->EnterpriseCode; - m_sEnterpriseName = pEnterpriseInfo->EnterpriseName.GetBSTR(); - m_sDescription = pEnterpriseInfo->Description.GetBSTR(); - m_sPhone = pEnterpriseInfo->Phone.GetBSTR(); - m_sFax = pEnterpriseInfo->Fax.GetBSTR(); - m_sEmail = pEnterpriseInfo->Email.GetBSTR(); - m_sUrl = pEnterpriseInfo->Url.GetBSTR(); - m_sAddress = pEnterpriseInfo->Address.GetBSTR(); - m_sCreateTime = pEnterpriseInfo->CreateTime.GetBSTR(); - //m_sCreator = pEnterpriseInfo->Creator.GetBSTR(); - m_nCreateUserId = pEnterpriseInfo->CreateUserId; - m_nEntExt = pEnterpriseInfo->EntExt; - } - return *this; - } -#endif - eb::bigint m_sEnterpriseCode; - //CEBString m_sEnterpriseCode; - CEBString m_sEnterpriseName; - CEBString m_sDescription; - CEBString m_sPhone; - CEBString m_sFax; - CEBString m_sEmail; - CEBString m_sUrl; - CEBString m_sAddress; - CEBString m_sCreateTime; - //CEBString m_sCreator; - eb::bigint m_nCreateUserId; - int m_nEntExt; -}; - -/*========================================================== -群组(部门)信息 -===========================================================*/ -class EB_GroupInfo -{ -public: - EB_GroupInfo(void) - : m_sEnterpriseCode(0), m_sGroupCode(0), m_sParentCode(0) - , m_nCreateUserId(0),m_nManagerUserId(0),m_nDisplayIndex(0), m_nGroupType(EB_GROUP_TYPE_DEPARTMENT) - , m_nMyEmpId(0),m_nEmpCount(0),m_nGroupVer(0) - , m_nGroupExtData(0) - {} - EB_GroupInfo(eb::bigint nEnterpriseId, eb::bigint nGroupId) - : m_sEnterpriseCode(nEnterpriseId), m_sGroupCode(nGroupId), m_sParentCode(0) - , m_nCreateUserId(0),m_nManagerUserId(0),m_nDisplayIndex(0),m_nGroupType(EB_GROUP_TYPE_DEPARTMENT) - , m_nMyEmpId(0),m_nEmpCount(0),m_nGroupVer(0) - , m_nGroupExtData(0) - {} - EB_GroupInfo(const EB_GroupInfo* pGroupInfo) - : m_sEnterpriseCode(0), m_sGroupCode(0), m_sParentCode(0) - , m_nCreateUserId(0),m_nManagerUserId(0),m_nDisplayIndex(0),m_nGroupType(EB_GROUP_TYPE_DEPARTMENT) - , m_nMyEmpId(0),m_nEmpCount(0),m_nGroupVer(0) - , m_nGroupExtData(0) - { - EB_GroupInfo::operator =(pGroupInfo); - } - EB_GroupInfo(const EB_GroupInfo& pGroupInfo) - : m_sEnterpriseCode(0), m_sGroupCode(0), m_sParentCode(0) - , m_nCreateUserId(0),m_nManagerUserId(0),m_nDisplayIndex(0),m_nGroupType(EB_GROUP_TYPE_DEPARTMENT) - , m_nMyEmpId(0),m_nEmpCount(0),m_nGroupVer(0) - , m_nGroupExtData(0) - { - EB_GroupInfo::operator =(pGroupInfo); - } -#ifdef USES_EBCOM_TEST - EB_GroupInfo(IEB_GroupInfo* pObj) - : m_sEnterpriseCode(0), m_sGroupCode(0), m_sParentCode(0) - , m_nCreateUserId(0),m_nManagerUserId(0),m_nDisplayIndex(0),m_nGroupType(EB_GROUP_TYPE_DEPARTMENT) - , m_nMyEmpId(0),m_nEmpCount(0),m_nGroupVer(0) - , m_nGroupExtData(0) - { - EB_GroupInfo::operator =(pObj); - } -#endif - const EB_GroupInfo& operator =(const EB_GroupInfo* pGroupInfo) - { - if (pGroupInfo!=NULL) - { - EB_GroupInfo::operator =(*pGroupInfo); - } - return *this; - } - const EB_GroupInfo& operator =(const EB_GroupInfo& pGroupInfo) - { - m_sEnterpriseCode = pGroupInfo.m_sEnterpriseCode; - m_sGroupCode = pGroupInfo.m_sGroupCode; - m_sGroupName = pGroupInfo.m_sGroupName; - m_sParentCode = pGroupInfo.m_sParentCode; - m_sDescription = pGroupInfo.m_sDescription; - m_sPhone = pGroupInfo.m_sPhone; - m_sFax = pGroupInfo.m_sFax; - m_sEmail = pGroupInfo.m_sEmail; - m_sUrl = pGroupInfo.m_sUrl; - m_sAddress = pGroupInfo.m_sAddress; - m_sCreateTime = pGroupInfo.m_sCreateTime; - //m_sCreator = pGroupInfo.m_sCreator; - m_nCreateUserId = pGroupInfo.m_nCreateUserId; - m_nManagerUserId = pGroupInfo.m_nManagerUserId; - m_nDisplayIndex = pGroupInfo.m_nDisplayIndex; - m_nGroupType = pGroupInfo.m_nGroupType; - m_nMyEmpId = pGroupInfo.m_nMyEmpId; - m_nEmpCount = pGroupInfo.m_nEmpCount; - m_nGroupVer = pGroupInfo.m_nGroupVer; - m_nGroupExtData = pGroupInfo.m_nGroupExtData; - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_GroupInfo& operator =(IEB_GroupInfo* pGroupInfo) - { - if (pGroupInfo != NULL) - { - m_sEnterpriseCode = pGroupInfo->EnterpriseCode; - m_sGroupCode = pGroupInfo->GroupCode; - m_sGroupName = pGroupInfo->GroupName.GetBSTR(); - m_sParentCode = pGroupInfo->ParentCode; - m_sDescription = pGroupInfo->Description.GetBSTR(); - m_sPhone = pGroupInfo->Phone.GetBSTR(); - m_sFax = pGroupInfo->Fax.GetBSTR(); - m_sEmail = pGroupInfo->Email.GetBSTR(); - m_sUrl = pGroupInfo->Url.GetBSTR(); - m_sAddress = pGroupInfo->Address.GetBSTR(); - m_sCreateTime = pGroupInfo->CreateTime.GetBSTR(); - //m_sCreator = pGroupInfo->Creator.GetBSTR(); - m_nCreateUserId = pGroupInfo->CreateUserId; - m_nManagerUserId = pGroupInfo->ManagerUserId; - m_nDisplayIndex = pGroupInfo->DisplayIndex; - m_nGroupType = (EB_GROUP_TYPE)pGroupInfo->GroupType; - m_nMyEmpId = pGroupInfo->MyEmpId; - m_nEmpCount = pGroupInfo->EmpCount; - } - return *this; - } -#endif - eb::bigint m_sEnterpriseCode; - eb::bigint m_sGroupCode; - CEBString m_sGroupName; - eb::bigint m_sParentCode; - //CEBString m_sParentCode; - CEBString m_sDescription; - CEBString m_sPhone; - CEBString m_sFax; - CEBString m_sEmail; - CEBString m_sUrl; - CEBString m_sAddress; - CEBString m_sCreateTime; - //CEBString m_sCreator; - eb::bigint m_nCreateUserId; - eb::bigint m_nManagerUserId; - int m_nDisplayIndex; - EB_GROUP_TYPE m_nGroupType; - eb::bigint m_nMyEmpId; - int m_nEmpCount; - eb::bigint m_nGroupVer; - int m_nGroupExtData; -}; - -/*========================================================== -用户分组信息 -===========================================================*/ -class EB_UGInfo -{ -public: - EB_UGInfo(void) - : m_nUGId(0) - {} - EB_UGInfo(eb::bigint nUGId,const CEBString& sGroupName) - : m_nUGId(nUGId),m_sGroupName(sGroupName) - {} - EB_UGInfo(const EB_UGInfo* pUGInfo) - : m_nUGId(0) - { - EB_UGInfo::operator =(pUGInfo); - } - const EB_UGInfo& operator = (const EB_UGInfo& pUGInfo) - { - EB_UGInfo::operator =(&pUGInfo); - return *this; - } - const EB_UGInfo& operator = (const EB_UGInfo* pUGInfo) - { - if (pUGInfo != NULL) - { - m_nUGId = pUGInfo->m_nUGId; - m_sGroupName = pUGInfo->m_sGroupName; - } - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_UGInfo& operator = (IEB_UGInfo* pUGInfo) - { - if (pUGInfo != NULL) - { - m_nUGId = pUGInfo->UGId; - m_sGroupName = pUGInfo->GroupName.GetBSTR(); - } - return *this; - } -#endif - eb::bigint m_nUGId; - CEBString m_sGroupName; -}; - -/*========================================================== -通讯录(联系人)信息 -===========================================================*/ -class EB_ContactInfo : public EB_UGInfo -{ -public: - EB_ContactInfo(void) - : EB_UGInfo(),m_nContactId(0),m_nContactUserId(0),m_nContactType(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - {} - EB_ContactInfo(eb::bigint nContactId) - : EB_UGInfo(),m_nContactId(nContactId),m_nContactType(0)//,m_sContact(sContact) - , m_nContactUserId(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - {} - //EB_ContactInfo(const CEBString& sContact) - // : EB_UGInfo(),m_nContactId(0),m_sContact(sContact) - // , m_nContactUserId(0) - //{} - EB_ContactInfo(const EB_ContactInfo* pContactInfo) - : EB_UGInfo(),m_nContactId(0),m_nContactUserId(0),m_nContactType(0) - , m_nLineState(EB_LINE_STATE_UNKNOWN) - , m_sHeadResourceId(0) - { - EB_ContactInfo::operator =(pContactInfo); - } - const EB_ContactInfo& operator = (const EB_ContactInfo& pContactInfo) - { - EB_ContactInfo::operator =(&pContactInfo); - return *this; - } - const EB_ContactInfo& operator = (const EB_ContactInfo* pContactInfo) - { - if (pContactInfo != NULL) - { - EB_UGInfo::operator =((EB_UGInfo*)pContactInfo); - m_nContactId = pContactInfo->m_nContactId; - m_nContactType = pContactInfo->m_nContactType; - m_sContact = pContactInfo->m_sContact; - //m_sGroup = pContactInfo->m_sGroup; - m_sName = pContactInfo->m_sName; - m_sPhone = pContactInfo->m_sPhone; - m_sEmail = pContactInfo->m_sEmail; - m_sAddress = pContactInfo->m_sAddress; - m_sDescription = pContactInfo->m_sDescription; - m_sCompany = pContactInfo->m_sCompany; - m_sJobTitle = pContactInfo->m_sJobTitle; - m_sTel = pContactInfo->m_sTel; - m_sFax = pContactInfo->m_sFax; - m_sUrl = pContactInfo->m_sUrl; - m_nContactUserId = pContactInfo->m_nContactUserId; - m_nLineState = pContactInfo->m_nLineState; - m_sHeadResourceId = pContactInfo->m_sHeadResourceId; - m_sHeadResourceFile = pContactInfo->m_sHeadResourceFile; - m_sHeadMd5 = pContactInfo->m_sHeadMd5; - } - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_ContactInfo& operator = (IEB_ContactInfo* pContactInfo) - { - if (pContactInfo != NULL) - { - m_nUGId = pContactInfo->UGId; - m_sGroupName = pContactInfo->GroupName.GetBSTR(); - - m_nContactId = pContactInfo->ContactId; - m_nContactUserId = pContactInfo->ContactUserId; - m_nContactType = pContactInfo->ContactType; - m_sContact = pContactInfo->Contact.GetBSTR(); - //m_sGroup = pContactInfo->Group.GetBSTR(); - m_sName = pContactInfo->Name.GetBSTR(); - m_sPhone = pContactInfo->Phone.GetBSTR(); - m_sEmail = pContactInfo->Email.GetBSTR(); - m_sAddress = pContactInfo->Address.GetBSTR(); - m_sDescription = pContactInfo->Description.GetBSTR(); - m_sCompany = pContactInfo->Company.GetBSTR(); - m_sJobTitle = pContactInfo->JobTitle.GetBSTR(); - m_sTel = pContactInfo->Tel.GetBSTR(); - m_sFax = pContactInfo->Fax.GetBSTR(); - m_sUrl = pContactInfo->Url.GetBSTR(); - m_nLineState = (EB_USER_LINE_STATE)pContactInfo->LineState; - m_sHeadResourceId = pContactInfo->HeadResourceId; - m_sHeadResourceFile = pContactInfo->HeadResourceFile.GetBSTR(); - m_sHeadMd5 = pContactInfo->HeadMd5.GetBSTR(); - } - return *this; - } -#endif - eb::bigint m_nContactId; - eb::bigint m_nContactUserId; - int m_nContactType; - CEBString m_sContact; - //CEBString m_sGroup; - CEBString m_sName; - CEBString m_sPhone; - //eb::bigint m_sPhone; - CEBString m_sEmail; - CEBString m_sAddress; - CEBString m_sDescription; - CEBString m_sCompany; - CEBString m_sJobTitle; - CEBString m_sTel; - CEBString m_sFax; - CEBString m_sUrl; - EB_USER_LINE_STATE m_nLineState; - - eb::bigint m_sHeadResourceId; - CEBString m_sHeadResourceFile; - CEBString m_sHeadMd5; -}; - - -/*========================================================== -会话远程桌面信息 -===========================================================*/ -class EB_RemoteDesktopInfo -{ -public: - EB_RemoteDesktopInfo(void) - : m_sCallId(0), m_nRDType(EB_RD_DESKTOP_SRC), m_nFromUserId(0), m_bOnDesktop(false) - { - } - EB_RemoteDesktopInfo(const EB_RemoteDesktopInfo& pObj) - : m_sCallId(0), m_nRDType(EB_RD_DESKTOP_SRC), m_nFromUserId(0), m_bOnDesktop(false) - { - EB_RemoteDesktopInfo::operator =(pObj); - } - const EB_RemoteDesktopInfo& operator = (const EB_RemoteDesktopInfo& pObj) - { - m_sCallId = pObj.m_sCallId; - m_nRDType = pObj.m_nRDType; - m_nFromUserId = pObj.m_nFromUserId; - m_bOnDesktop = pObj.m_bOnDesktop; - return *this; - } - eb::bigint m_sCallId; - EB_REMOTE_DESKTOP_TYPE m_nRDType; - eb::bigint m_nFromUserId; - bool m_bOnDesktop; -}; - -/*========================================================== -会话视频信息 -===========================================================*/ -class EB_VideoInfo -{ -public: - EB_VideoInfo(void) - : m_sCallId(0), m_nVideoType(EB_VIDEO_BOTH) - { - } - EB_VideoInfo(const EB_VideoInfo& pObj) - : m_sCallId(0), m_nVideoType(EB_VIDEO_BOTH) - { - EB_VideoInfo::operator =(pObj); - } - const EB_VideoInfo& operator = (const EB_VideoInfo& pObj) - { - m_sCallId = pObj.m_sCallId; - m_nVideoType = pObj.m_nVideoType; - return *this; - } - eb::bigint m_sCallId; - EB_VIDEO_TYPE m_nVideoType; -}; - -/*========================================================== -用户视频信息 -===========================================================*/ -class EB_UserVideoInfo -{ -public: - EB_UserVideoInfo(void) - : m_sUserAccount(0), m_bOnVideo(false)//, m_nUserVideoId(0) - { - } - EB_UserVideoInfo(eb::bigint sUser, bool bOnVideo) - : m_sUserAccount(sUser),m_bOnVideo(bOnVideo)//, m_nUserVideoId(nId) - {} - EB_UserVideoInfo(const EB_UserVideoInfo& pInfo) - : m_sUserAccount(0),m_bOnVideo(false)//, m_nUserVideoId(0) - { - EB_UserVideoInfo::operator =(pInfo); - } -#ifdef USES_EBCOM_TEST - EB_UserVideoInfo(IEB_UserVideoInfo* pInfo) - : m_sUserAccount(0),m_bOnVideo(false)//, m_nUserVideoId(0) - { - EB_UserVideoInfo::operator =(pInfo); - } -#endif - const EB_UserVideoInfo& operator =(const EB_UserVideoInfo& pInfo) - { - m_sUserAccount = pInfo.m_sUserAccount; - m_bOnVideo = pInfo.m_bOnVideo; - //m_nUserVideoId = pInfo.m_nUserVideoId; - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_UserVideoInfo& operator =(IEB_UserVideoInfo* pInfo) - { - if (pInfo != NULL) - { - m_sUserAccount = pInfo->UserId; - m_bOnVideo = pInfo->OnVideo==VARIANT_TRUE?true:false; - //m_nUserVideoId = pInfo->UserVideoId; - } - return *this; - } - -#endif - eb::bigint m_sUserAccount; - //int m_nUserVideoId; - bool m_bOnVideo; -}; - -/*========================================================== -帐号信息 -===========================================================*/ -class EB_AccountInfo -{ -public: - EB_AccountInfo(void) - : m_nUserId(0),m_nPhone(0),m_nLogonType(0) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nArea1(0), m_nArea2(0), m_nArea3(0), m_nArea4(0) - //, m_nLineState(EB_LINE_STATE_UNKNOWN) - //, m_nSetting(0) - //, m_tOnlineTime(0) - { - } - EB_AccountInfo(eb::bigint nUserId, const CEBString& sAccount,int nLogonType) - : m_nUserId(nUserId),m_sAccount(sAccount) - , m_nPhone(0) - , m_nLogonType(nLogonType) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nArea1(0), m_nArea2(0), m_nArea3(0), m_nArea4(0) - //, m_nLineState(EB_LINE_STATE_UNKNOWN) - //, m_nSetting(0) - { - //m_tOnlineTime = time(0); - } - EB_AccountInfo(const EB_AccountInfo* pAccountInfo) - : m_nUserId(0),m_nPhone(0),m_nLogonType(0) - , m_nGender(EB_GENDER_UNKNOWN) - , m_nBirthday(0) - , m_nArea1(0), m_nArea2(0), m_nArea3(0), m_nArea4(0) - //, m_nLineState(EB_LINE_STATE_UNKNOWN) - //, m_nSetting(0) - //, m_tOnlineTime(0) - { - EB_AccountInfo::operator =(pAccountInfo); - } -#ifdef USES_EBCOM_TEST - EB_AccountInfo(const IEB_AccountInfo* pAccountInfo) - : m_nLogonType(0) - //, m_nLineState(EB_LINE_STATE_UNKNOWN) - //, m_nSetting(0) - //, m_tOnlineTime(0) - { - EB_AccountInfo::operator =(pAccountInfo); - } -#endif - const EB_AccountInfo& operator =(const EB_AccountInfo& pAccountInfo) - { - EB_AccountInfo::operator =(&pAccountInfo); - return *this; - } - const EB_AccountInfo& operator =(const EB_AccountInfo* pAccountInfo) - { - if (pAccountInfo!=NULL) - { - m_nUserId = pAccountInfo->m_nUserId; - m_sAccount = pAccountInfo->m_sAccount; - m_sPasswd = pAccountInfo->m_sPasswd; - m_sUserName = pAccountInfo->m_sUserName; - m_nGender = pAccountInfo->m_nGender; - m_nBirthday = pAccountInfo->m_nBirthday; - m_sMobile = pAccountInfo->m_sMobile; - m_sTel = pAccountInfo->m_sTel; - m_sEmail = pAccountInfo->m_sEmail; - m_nArea1 = pAccountInfo->m_nArea1; - m_sArea1 = pAccountInfo->m_sArea1; - m_nArea2 = pAccountInfo->m_nArea2; - m_sArea2 = pAccountInfo->m_sArea2; - m_nArea3 = pAccountInfo->m_nArea3; - m_sArea3 = pAccountInfo->m_sArea3; - m_nArea4 = pAccountInfo->m_nArea4; - m_sArea4 = pAccountInfo->m_sArea4; - m_sAddress = pAccountInfo->m_sAddress; - m_sUrl = pAccountInfo->m_sUrl; - m_sZipCode = pAccountInfo->m_sZipCode; - m_nLogonType = pAccountInfo->m_nLogonType; - //m_tOnlineTime = pAccountInfo->m_tOnlineTime; - //m_nLineState = pAccountInfo->m_nLineState; - m_sDescription = pAccountInfo->m_sDescription; - //m_nSetting = pAccountInfo->m_nSetting; - //m_sDefaultEmp = pAccountInfo->m_sDefaultEmp; - m_pFromCardInfo.operator =(&pAccountInfo->m_pFromCardInfo); - } - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_AccountInfo& operator =(IEB_AccountInfo* pAccountInfo) - { - if (pAccountInfo!=NULL) - { - m_nUserId = pAccountInfo->UserId; - m_sAccount = pAccountInfo->Account.GetBSTR(); - m_sPasswd = pAccountInfo->Passwd.GetBSTR(); - m_sUserName = pAccountInfo->UserName.GetBSTR(); - m_nGender = (EB_GENDER_TYPE)pAccountInfo->Gender; - m_nBirthday = pAccountInfo->Birthday; - m_sMobile = pAccountInfo->Mobile.GetBSTR(); - m_sTel = pAccountInfo->Tel.GetBSTR(); - m_sEmail = pAccountInfo->Email.GetBSTR(); - m_nArea1 = pAccountInfo->Area1; - m_sArea1 = pAccountInfo->Area1String.GetBSTR(); - m_nArea2 = pAccountInfo->Area2; - m_sArea2 = pAccountInfo->Area2String.GetBSTR(); - m_nArea3 = pAccountInfo->Area3; - m_sArea3 = pAccountInfo->Area3String.GetBSTR(); - m_nArea4 = pAccountInfo->Area4; - m_sArea4 = pAccountInfo->Area4String.GetBSTR(); - m_sAddress = pAccountInfo->Address.GetBSTR(); - m_sUrl = pAccountInfo->Url.GetBSTR(); - m_sZipCode = pAccountInfo->ZipCode.GetBSTR(); - m_nLogonType = pAccountInfo->LogonType; - //m_tOnlineTime = pAccountInfo->m_tOnlineTime; - //m_nLineState = pAccountInfo->m_nLineState; - m_sDescription = pAccountInfo->Description.GetBSTR(); - //m_nSetting = pAccountInfo->m_nSetting; - //m_sDefaultEmp = pAccountInfo->m_sDefaultEmp; - CComPtr m_pECardInfo; - pAccountInfo->get_ECardInfo(&m_pECardInfo); - m_pFromCardInfo.operator =(m_pECardInfo); - } - return *this; - } -#endif - void SetUserId(eb::bigint v) {m_nUserId = v;} - eb::bigint GetUserId(void) const {return m_nUserId;} -// CEBString GetStringUserId(void) const -// { -// char lpszUserId[24]; -//#ifdef WIN32 -// sprintf(lpszUserId,"%I64d",m_nUserId); -//#else -// sprintf(lpszUserId,"%lld",m_nUserId); -//#endif -// return lpszUserId; -// } - void SetPhone(eb::bigint v) {m_nPhone = v;} - eb::bigint GetPhone(void) const {return m_nPhone;} - void SetAccount(const CEBString& v) {m_sAccount=v;} - const CEBString & GetAccount(void) const {return m_sAccount;} - void SetPasswd(const CEBString& v) {m_sPasswd=v;} - const CEBString& GetPasswd(void) const {return m_sPasswd;} - void SetUserName(const CEBString& v) {m_sUserName=v;} - const CEBString& GetUserName(void) const {return m_sUserName;} - void SetLogonType(int value) {m_nLogonType = value;} - int GetLogonType(void) const {return m_nLogonType;} - //void SetOnlineTime(time_t value) {m_tOnlineTime = value;} - //time_t GetOnlineTime(void) const {return m_tOnlineTime;} - //void SetLineState(EB_USER_LINE_STATE value) {m_nLineState = value;} - //EB_USER_LINE_STATE GetLineState(void) const {return m_nLineState;} - //bool IsUnknownLineState(void) const {return m_nLineState == EB_LINE_STATE_UNKNOWN;} - //bool IsOnLineState(void) const {return m_nLineState == EB_LINE_STATE_ONLINE;} - //bool IsOffLineState(void) const {return m_nLineState == EB_LINE_STATE_OFFLINE;} - void SetDescription(const CEBString& v) {m_sDescription = v;} - const CEBString& GetDescription(void) const {return m_sDescription;} - //void SetSetting(int v) {m_nSetting = v;} - //int GetSetting(void) const {return m_nSetting;} - //void SetDefaultEmp(const CEBString& v) {m_sDefaultEmp = v;} - //const CEBString& GetDefaultEmp(void) const {return m_sDefaultEmp;} - - void SetGender(EB_GENDER_TYPE v) {m_nGender = v;} - EB_GENDER_TYPE GetGender(void) const {return m_nGender;} - void SetBirthday(int v) {m_nBirthday = v;} - int GetBirthday(void) const {return m_nBirthday;} - void SetMobile(const CEBString& v) {m_sMobile = v;} - const CEBString& GetMobile(void) const {return m_sMobile;} - void SetTel(const CEBString& v) {m_sTel = v;} - const CEBString& GetTel(void) const {return m_sTel;} - void SetEmail(const CEBString& v) {m_sEmail = v;} - const CEBString& GetEmail(void) const {return m_sEmail;} - void SetArea1(int v) {m_nArea1 = v;} - int GetArea1(void) const {return m_nArea1;} - void SetArea1String(const CEBString& v) {m_sArea1 = v;} - const CEBString& GetArea1String(void) const {return m_sArea1;} - void SetArea2(int v) {m_nArea2 = v;} - int GetArea2(void) const {return m_nArea2;} - void SetArea2String(const CEBString& v) {m_sArea2 = v;} - const CEBString& GetArea2String(void) const {return m_sArea2;} - void SetArea3(int v) {m_nArea3 = v;} - int GetArea3(void) const {return m_nArea3;} - void SetArea3String(const CEBString& v) {m_sArea3 = v;} - const CEBString& GetArea3String(void) const {return m_sArea3;} - void SetArea4(int v) {m_nArea4 = v;} - int GetArea4(void) const {return m_nArea4;} - void SetArea4String(const CEBString& v) {m_sArea4 = v;} - const CEBString& GetArea4String(void) const {return m_sArea4;} - void SetAddress(const CEBString& v) {m_sAddress = v;} - const CEBString& GetAddress(void) const {return m_sAddress;} - void SetUrl(const CEBString& v) {m_sUrl = v;} - const CEBString& GetUrl(void) const {return m_sUrl;} - void SetZipCode(const CEBString& v) {m_sZipCode = v;} - const CEBString& GetZipCode(void) const {return m_sZipCode;} - - EB_ECardInfo m_pFromCardInfo; -protected: - eb::bigint m_nUserId; - CEBString m_sAccount; - eb::bigint m_nPhone; - CEBString m_sPasswd; - CEBString m_sUserName; - unsigned int m_nLogonType; - //time_t m_tOnlineTime; - //EB_USER_LINE_STATE m_nLineState; - CEBString m_sDescription; - //unsigned int m_nSetting; - //CEBString m_sDefaultEmp; - EB_GENDER_TYPE m_nGender; // 0:unknown 1:M 2:F - int m_nBirthday; // 19790101 - CEBString m_sMobile; - CEBString m_sTel; - CEBString m_sEmail; - int m_nArea1; - CEBString m_sArea1; - int m_nArea2; - CEBString m_sArea2; - int m_nArea3; - CEBString m_sArea3; - int m_nArea4; - CEBString m_sArea4; - CEBString m_sAddress; - CEBString m_sUrl; - CEBString m_sZipCode; -}; - -/*========================================================== -呼叫(会话)信息 -===========================================================*/ -class EB_CallInfo -{ -public: - EB_CallInfo(void) - : m_sGroupCode(0),m_sOldCallId(0),m_sCallId(0),m_nFromUserId(0) - { - } - EB_CallInfo(eb::bigint nFromUserId, const CEBString & sFromAccount, eb::bigint sCallId,eb::bigint sGroupCode) - : m_nFromUserId(nFromUserId),m_sFromAccount(sFromAccount),m_sCallId(sCallId),m_sGroupCode(sGroupCode),m_sOldCallId(0) - //, m_nStateCode(0) - //, m_bOwner(false) - { - } - EB_CallInfo(const EB_CallInfo* pCallInfo) - : m_sGroupCode(0),m_sOldCallId(0),m_sCallId(0),m_nFromUserId(0) - { - EB_CallInfo::operator =(pCallInfo); - } - const EB_CallInfo& operator =(const EB_CallInfo& pCallInfo) - { - EB_CallInfo::operator =(&pCallInfo); - return *this; - } - const EB_CallInfo& operator =(const EB_CallInfo* pCallInfo) - { - if (pCallInfo!=NULL) - { - m_sCallId = pCallInfo->m_sCallId; - m_sGroupCode = pCallInfo->m_sGroupCode; - m_sOldCallId = pCallInfo->m_sOldCallId; - m_nFromUserId = pCallInfo->m_nFromUserId; - m_sFromAccount = pCallInfo->m_sFromAccount; - } - return *this; - } -#ifdef USES_EBCOM_TEST - const EB_CallInfo& operator =(IEB_CallInfo* pCallInfo) - { - if (pCallInfo != NULL) - { - m_sCallId = pCallInfo->CallId; - m_sGroupCode = pCallInfo->GroupCode; - m_sOldCallId = pCallInfo->OldCallId; - m_nFromUserId = pCallInfo->FromUserId; - m_sFromAccount = pCallInfo->FromAccount.GetBSTR(); - } - return *this; - } -#endif - void SetCallId(eb::bigint v) {m_sCallId=v;} - eb::bigint GetCallId(void) const {return m_sCallId;} - void SetFromUserId(eb::bigint nFromUserId) {m_nFromUserId=nFromUserId;} - eb::bigint GetFromUserId(void) const {return m_nFromUserId;} - void SetFromAccount(const CEBString& sFromAccount) {m_sFromAccount = sFromAccount;} - const CEBString& GetFromAccount(void) const {return m_sFromAccount;} - - //EB_CallInfo(const CEBString & sFromAccount, int nStateCode) - // : m_sFromAccount(sFromAccount), m_sCallId("") - // , m_nStateCode(nStateCode) - // , m_bOwner(false) - //{ - //} - eb::bigint m_sGroupCode; - eb::bigint m_sOldCallId; -protected: - eb::bigint m_sCallId; - eb::bigint m_nFromUserId; - CEBString m_sFromAccount; - //int m_nStateCode; - //bool m_bOwner; -}; -// -// -///*========================================================== -//呼叫连接信息 -//===========================================================*/ -//class EB_ConnectInfo -// : public EB_CallInfo -//{ -//public: -// enum CONNECTED_FLAG -// { -// CONNECTED_OFFLINE_USER = 0x001 -// , CONNECTED_OWNER_CALL = 0x002 -// , CONNECTED_AUTO_ACK = 0x004 -// , CONNECTED_ONLINE_INCALL = 0x008 -// }; -// -// EB_ConnectInfo(void) -// : m_nConnectedFlag(0) -// { -// } -// EB_ConnectInfo(const CEBString & sFromAccount, const CEBString & sCallId,const CEBString& sGroupCode) -// : EB_CallInfo(sFromAccount,sCallId,sGroupCode) -// , m_nConnectedFlag(0) -// { -// } -// int m_nConnectedFlag; -//}; - -} // namespace entboost - -#endif // __eb_object_h__ diff --git a/src/ebclib/lib/ebvideoroom.dll b/src/ebclib/lib/ebvideoroom.dll deleted file mode 100644 index bece365..0000000 Binary files a/src/ebclib/lib/ebvideoroom.dll and /dev/null differ