本文整理汇总了C++中NIM_SDK_GET_FUNC函数的典型用法代码示例。如果您正苦于以下问题:C++ NIM_SDK_GET_FUNC函数的具体用法?C++ NIM_SDK_GET_FUNC怎么用?C++ NIM_SDK_GET_FUNC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NIM_SDK_GET_FUNC函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NIM_SDK_GET_FUNC
void Talk::SendMsg(const std::string& json_msg, const std::string& json_extension/* = ""*/, FileUpPrgCallback* pcb/* = nullptr*/)
{
if (pcb)
{
return NIM_SDK_GET_FUNC(nim_talk_send_msg)(json_msg.c_str(), nullptr, &CallbackFileUploadProcess, pcb);
}
else
{
return NIM_SDK_GET_FUNC(nim_talk_send_msg)(json_msg.c_str(), nullptr, nullptr, nullptr);
}
}
示例2: NIM_SDK_GET_FUNC
std::string Tool::GetUuid()
{
const char *uuid = NIM_SDK_GET_FUNC(nim_tool_get_uuid)();
std::string uuid_str = (std::string)uuid;
Global::FreeBuf((void *)uuid);
return uuid_str;
}
示例3: SpeedCallback
bool NOS::FetchMediaEx(const IMMessage& msg, const std::string& json_extension, const DownloadMediaCallback& callback_result, const ProgressCallback& callback_progress, const SpeedCallback& callback_speed /*= SpeedCallback()*/, const TransferInfoCallback& callback_transfer /*= TransferInfoCallback()*/)
{
ProgressCallback* callback_progress_pt = nullptr;
if (callback_progress)
callback_progress_pt = new ProgressCallback(callback_progress);
SpeedCallback* callback_speed_pointer = nullptr;
if (callback_speed)
callback_speed_pointer = new SpeedCallback(callback_speed);
TransferInfoCallback* callback_transfer_pointer = nullptr;
if (callback_transfer)
callback_transfer_pointer = new TransferInfoCallback(callback_transfer);
DownloadCallbackUserData *user_data = nullptr;
if (callback_result)
{
user_data = new DownloadCallbackUserData();
user_data->callback_result = callback_result;
user_data->callback_progress_pointer = callback_progress_pt;
user_data->callback_speed_pointer = callback_speed_pointer;
user_data->callback_transfer_pointer = callback_transfer_pointer;
}
NIM_SDK_GET_FUNC(nim_nos_download_media_ex)(msg.ToJsonString(false).c_str(), json_extension.c_str(), &CallbackDownload, user_data, &CallbackProgress, callback_progress_pt, &CallbackSpeed, callback_speed_pointer, &CallbackTransferInfo, callback_transfer_pointer);
return true;
}
示例4: ProgressCallback
bool NOS::DownloadResourceEx(const std::string& nos_url, const std::string& json_extension, const DownloadMediaCallback& callback_result, const ProgressCallback& callback_progress, const SpeedCallback& callback_speed, const TransferInfoCallback& callback_transfer)
{
if (nos_url.empty())
return false;
ProgressCallback* callback_progress_pointer = nullptr;
if (callback_progress)
callback_progress_pointer = new ProgressCallback(callback_progress);
SpeedCallback* callback_speed_pointer = nullptr;
if (callback_speed)
callback_speed_pointer = new SpeedCallback(callback_speed);
TransferInfoCallback* callback_transfer_pointer = nullptr;
if (callback_transfer)
callback_transfer_pointer = new TransferInfoCallback(callback_transfer);
DownloadCallbackUserData* callback_result_userdata = nullptr;
if (callback_result)
{
callback_result_userdata = new DownloadCallbackUserData();
callback_result_userdata->callback_result = callback_result;
callback_result_userdata->callback_progress_pointer = callback_progress_pointer;
callback_result_userdata->callback_speed_pointer = callback_speed_pointer;
callback_result_userdata->callback_transfer_pointer = callback_transfer_pointer;
}
NIM_SDK_GET_FUNC(nim_nos_download_ex)(nos_url.c_str(), json_extension.c_str(), &CallbackDownload, callback_result_userdata, &CallbackProgress, callback_progress_pointer, &CallbackSpeed, callback_speed_pointer, &CallbackTransferInfo, callback_transfer_pointer);
return true;
}
示例5: NIM_SDK_GET_FUNC
bool ChatRoom::Init(const std::string& json_extension/* = ""*/)
{
if (!SDKFunction::LoadSdkDll())
return false;
NIM_SDK_GET_FUNC(nim_chatroom_init)(json_extension.c_str());
return true;
}
示例6: NIM_SDK_GET_FUNC
//capture = true 监听视频采集数据(摄像头)
//capture = false 监听视频接收数据(接收到的图像数据,由上层播放)
void VChat::SetVideoDataCb(bool capture, nim_vchat_video_data_cb_func cb)
{
Json::FastWriter fs;
Json::Value value;
value[nim::kNIMVideoSubType] = kNIMVideoSubTypeI420;
std::string json_value = fs.write(value);
NIM_SDK_GET_FUNC(nim_vchat_set_video_data_cb)(capture, json_value.c_str(), cb, nullptr);
}
示例7: ChatRoomRequestEnterCallback
void PluginIn::ChatRoomRequestEnterAsync(const __int64 room_id, const ChatRoomRequestEnterCallback &callback, const std::string& json_extension/* = ""*/)
{
ChatRoomRequestEnterCallback* cb_pointer = nullptr;
if (callback)
cb_pointer = new ChatRoomRequestEnterCallback(callback);
return NIM_SDK_GET_FUNC(nim_plugin_chatroom_request_enter_async)(room_id, json_extension.c_str(), &CallbackRequestChatRoomEnter, cb_pointer);
}
示例8: QuerySessionListCallabck
void Session::QueryAllRecentSessionAsync(const QuerySessionListCallabck& cb, const std::string& json_extension)
{
QuerySessionListCallabck* cb_pointer = nullptr;
if (cb)
{
cb_pointer = new QuerySessionListCallabck(cb);
}
return NIM_SDK_GET_FUNC(nim_session_query_all_recent_session_async)(json_extension.c_str(), &CallbackQuerySession, cb_pointer);
}
示例9: ChangeCallback
void Session::RegChangeCb(const ChangeCallback& cb, const std::string& json_extension)
{
delete g_chang_cb_pointer;
if (cb)
{
g_chang_cb_pointer = new ChangeCallback(cb);
}
return NIM_SDK_GET_FUNC(nim_session_reg_change_cb)(json_extension.c_str(), &CallbackSessionChange, g_chang_cb_pointer);
}
示例10: UserNameCardChangedCallback
void User::RegUserNameCardChangedCb(const UserNameCardChangedCallback & cb, const std::string & json_extension)
{
delete g_uinfo_changed_cb_pointer;
if (cb)
{
g_uinfo_changed_cb_pointer = new UserNameCardChangedCallback(cb);
}
return NIM_SDK_GET_FUNC(nim_user_reg_user_name_card_changed_cb)(json_extension.c_str(), &CallbackUserNameCardChange, g_uinfo_changed_cb_pointer);
}
示例11: GetBlackListCallback
void User::GetBlacklist(const GetBlackListCallback& cb, const std::string& json_extension)
{
GetBlackListCallback* cb_pointer = nullptr;
if (cb)
{
cb_pointer = new GetBlackListCallback(cb);
}
return NIM_SDK_GET_FUNC(nim_user_get_mute_blacklist)(json_extension.c_str(), &CallbackGetBlackList, cb_pointer);
}
示例12: SpecialRelationshipChangedCallback
void User::RegSpecialRelationshipChangedCb(const SpecialRelationshipChangedCallback& cb, const std::string& json_extension)
{
delete g_changed_cb_pointer;
if (cb)
{
g_changed_cb_pointer = new SpecialRelationshipChangedCallback(cb);
}
return NIM_SDK_GET_FUNC(nim_user_reg_special_relationship_changed_cb)(json_extension.c_str(), &CallbackSpecialRelationChange, g_changed_cb_pointer);
}
示例13: DeleteAllCallback
void SystemMsg::DeleteAllAsync( const DeleteAllCallback& cb, const std::string& json_extension /*= ""*/ )
{
DeleteAllCallback* cb_pointer = nullptr;
if (cb)
{
cb_pointer = new DeleteAllCallback(cb);
}
return NIM_SDK_GET_FUNC(nim_sysmsg_delete_all_async)(json_extension.c_str(), &CallbackNotifySysmsgRes, cb_pointer);
}
示例14: SendCustomSysmsgCallback
void SystemMsg::RegSendCustomSysmsgCb(const SendCustomSysmsgCallback& cb, const std::string& json_extension)
{
delete g_send_custom_sysmsg_cb_pointer;
if (cb)
{
g_send_custom_sysmsg_cb_pointer = new SendCustomSysmsgCallback(cb);
}
return NIM_SDK_GET_FUNC(nim_sysmsg_reg_custom_notification_arc_cb)(json_extension.c_str(), &CallbackSendCustomSysmsg, g_send_custom_sysmsg_cb_pointer);
}
示例15: NIM_SDK_GET_FUNC
bool NOS::StopFetchMedia(const IMMessage& msg)
{
if (msg.client_msg_id_.empty() || msg.local_res_id_.empty())
return false;
NIM_SDK_GET_FUNC(nim_nos_stop_download_media)(msg.ToJsonString(false).c_str());
return true;
}