如何使用容联SDK,以及如何使用回调简单示例

一、容联SDK如何使用

A、收费标准(公有云走网络的都是免费的)
          语音会议提供一个房间最大支持32方
          视频会议提供一个房间最大支持30方

(免费的弊端:1、会议名称是可被使用容联SDK的所有人看到(不过可以通过加密方式避免其他人加入,加密后其他人只能看到名及人数)2、容联管理员可以直接删除这个会议。)

B、引入外接库:ECsdk.dll、libx264-142.dll、Ecmedia.dll、libx264-148.dll

C、官方提供调用的API:(回调的方式)

1、接口名称:ECSDK_Initialize //初始化ECsdk
2、接口名称:ECSDK_UnInitialize //注销ECsdk
……(更多详细接口及应用请查看容联提供的《C__SDK说明书.doc》和接口文档《pc开发指南文档.doc》)

D、容联SDK引用具体步骤:
1、引入SDK(将容联提供的库头文件加入到工程中,可以设置工程的头文件路径或者将文件添加到工程目录中。)
2、初始化SDK并设置回调
3、请求回调和通知回调(这是两种异步回调的方式)
4、注销SDK

二、容联回调的简单示例:
1、先实现容联对内接口类
#ifndef CONTROLER_RL_H

#define CONTROLER_RL_H

#include "interface/ECStructDef.h"

class RLInterface

{

public: 

static void Init(RLInterface *d) 

{

LoginCallBackFunc::setInstance(d);

……

}

 virtual void RLLogoutResult(bool) = 0;  ……};

#endif // CONTROLER_RL_H 

2、与容联SDK对接回调接口(注意函数名称大小写)
#ifndef LOGINCALLBACKFUNC_H

#define LOGINCALLBACKFUNC_H

/********************************************** * 

@author:Zhenyu.Sha * 

@effect:登录的回调函数类,更多注释见源文件

 * 使用前,请先设置setInstance()

***********************************************/

#include "../interface/ECStructDef.h"

class RLInterface;

namespace LoginCallBackFunc{

void setInstance(RLInterface *d);

}

static RLInterface *Instance = Q_NULLPTR;

void LoginCallBackFunc::setInstance(RLInterface *d)

Instance = d;

}

void OnLogOut(int reason)

{

Instance->RLLogoutResult(reason == EC_Response_Success);

……

#endif // LOGINCALLBACKFUNC_H 

3、与我们的软件对接的接口
      ECGeneralCallBackInterface* m_pECGeneralCallBack = Q_NULLPTR;
//设置个人信息回调

      m_pECGeneralCallBack = new ECGeneralCallBackInterface;

 if(m_pECGeneralCallBack) {  

      memset(m_pECGeneralCallBack,0,sizeof(ECGeneralCallBackInterface)); 

      m_pECGeneralCallBack->pfonLogOut = OnLogOut;  

      SetGeneralCallBackFuction(m_pECGeneralCallBack);

 }

4、注意事项(必须在初始化sdk后添加回调,否则回调无作用)
     Init(this);//初始化接口

     ECSDK_Initialize();//初始化sdk  

//设置dns关闭

     int dns = SetInternalDNS(false, NULL, 0); 

     if(dns != 0) { 

          qDebug() << "dns fail";

      } 

//设置个人信息回调 

    m_pECGeneralCallBack = new ECGeneralCallBackInterface;

    if(m_pECGeneralCallBack) {
          memset(m_pECGeneralCallBack,0,sizeof(ECGeneralCallBackInterface));

          m_pECGeneralCallBack->pfonLogOut = OnLogOut; 

          SetGeneralCallBackFuction(m_pECGeneralCallBack);

    }


renren-fast 框架集成云通讯短信sdk Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.google.gson.JsonParser.parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement;

03-22
renren-fast 框架,使用了云通讯的短信sdk后,调用短信发送,报错这个,不知道怎么处理 短信sdk https://doc.yuntongxun.com/p/5e1595e4d8130bd800fdb327 org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.google.gson.JsonParser.parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement; at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1055) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at io.renren.common.xss.XssFilter.doFilter(XssFilter.java:30) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:141) at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:82) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
©️2020 CSDN 皮肤主题: 代码科技 设计师: Amelia_0503 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值