Liblinphone 3.9.1中文--Modules--Initializing liblinphone

Initializing liblinphone   初始化liblinphone


结构体 

 struct _LCSipTransports

 struct  _LinphoneCoreVTable


 宏

 #define LC_SIP_TRANSPORT_DISABLED  0

 #define LC_SIP_TRANSPORT_RANDOM    -1


自定义类型

typedef struct _LinphoneCore  LinphoneCore
typedef struct _LCSipTransports  LCSipTransports
typedef enum _LinphoneStreamType  LinphoneStreamType
typedef enum _LinphoneIceState  LinphoneIceState
typedef enum _LinphoneUpnpState  LinphoneUpnpState
typedef enum _LinphoneGlobalState  LinphoneGlobalState
typedef enum _LinphoneConfigureState  LinphoneConfigureState

typedef  enum 
_LinphoneCoreLogCollectionUploadState 
LinphoneCoreLogCollectionUploadState
typedef  void(*  LinphoneCoreGlobalStateChangedCb )(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message)
typedef  void(*  LinphoneCoreCallStateChangedCb )(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message)
typedef  void(*  LinphoneCoreCallEncryptionChangedCb )(LinphoneCore *lc, LinphoneCall *call, bool_t on, const char *authentication_token)
typedef  void(*  LinphoneCoreRegistrationStateChangedCb )(LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState cstate, const char *message)
typedef  void(*  ShowInterfaceCb )(LinphoneCore *lc)
typedef  void(*  DisplayStatusCb )(LinphoneCore *lc, const char *message)
typedef  void(*  DisplayMessageCb )(LinphoneCore *lc, const char *message)
typedef  void(*  DisplayUrlCb )(LinphoneCore *lc, const char *message, const char *url)
typedef  void(*  LinphoneCoreCbFunc )(LinphoneCore *lc, void *user_data)
typedef  void(*  LinphoneCoreNotifyPresenceReceivedCb )(LinphoneCore *lc, LinphoneFriend *lf)
typedef  void(*  LinphoneCoreNewSubscriptionRequestedCb )(LinphoneCore *lc, LinphoneFriend *lf, const char *url)
typedef  void(*  LinphoneCoreAuthInfoRequestedCb )(LinphoneCore *lc, const char *realm, const char *username, const char *domain)
typedef  void(*  LinphoneCoreCallLogUpdatedCb )(LinphoneCore *lc, LinphoneCallLog *newcl)
typedef  void(*  LinphoneCoreTextMessageReceivedCb )(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message)
typedef  void(*  LinphoneCoreMessageReceivedCb )(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message)
typedef  void(*  LinphoneCoreFileTransferRecvCb )(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, const char *buff, size_t size)
typedef  void(*  LinphoneCoreFileTransferSendCb )(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, char *buff, size_t *size)
typedef  void(*  LinphoneCoreFileTransferProgressIndicationCb )(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent*content, size_t offset, size_t total)
typedef  void(*  LinphoneCoreIsComposingReceivedCb )(LinphoneCore *lc, LinphoneChatRoom *room)
typedef  void(*  LinphoneCoreDtmfReceivedCb )(LinphoneCore *lc, LinphoneCall *call, int dtmf)
typedef  void(*  LinphoneCoreReferReceivedCb )(LinphoneCore *lc, const char *refer_to)
typedef  void(*  LinphoneCoreBuddyInfoUpdatedCb )(LinphoneCore *lc, LinphoneFriend *lf)
typedef  void(*  LinphoneCoreTransferStateChangedCb )(LinphoneCore *lc, LinphoneCall *transfered, LinphoneCallState new_call_state)
typedef  void(*  LinphoneCoreCallStatsUpdatedCb )(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallStats *stats)
typedef  void(*  LinphoneCoreInfoReceivedCb )(LinphoneCore *lc, LinphoneCall *call, const LinphoneInfoMessage *msg)
typedef  enum 
_LinphoneConfiguringState 
LinphoneConfiguringState
typedef  void(*  LinphoneCoreConfiguringStatusCb )(LinphoneCore *lc, LinphoneConfiguringState status, const char *message)
typedef  void(*  LinphoneCoreNetworkReachableCb )(LinphoneCore *lc, bool_t reachable)
typedef  void(*  LinphoneCoreLogCollectionUploadStateChangedCb )(LinphoneCore *lc, LinphoneCoreLogCollectionUploadState state, const char *info)
typedef  void(*  LinphoneCoreLogCollectionUploadProgressIndicationCb )(LinphoneCore *lc, size_t offset, size_t total)
typedef  void(*  LinphoneCoreFriendListCreatedCb )(LinphoneCore *lc, LinphoneFriendList *list)
typedef  void(*  LinphoneCoreFriendListRemovedCb )(LinphoneCore *lc, LinphoneFriendList *list)
typedef  struct _LinphoneCoreVTable  LinphoneCoreVTable
     

枚举

            

enum   _LinphoneStreamType { 
  LinphoneStreamTypeAudio
  LinphoneStreamTypeVideo
  LinphoneStreamTypeText
  LinphoneStreamTypeUnknown 
}
enum   _LinphoneIceState { 
  LinphoneIceStateNotActivated
  LinphoneIceStateFailed
  LinphoneIceStateInProgress
  LinphoneIceStateHostConnection
  LinphoneIceStateReflexiveConnection
  LinphoneIceStateRelayConnection 
}
enum   _LinphoneUpnpState { 
  LinphoneUpnpStateIdle
  LinphoneUpnpStatePending
  LinphoneUpnpStateAdding
  LinphoneUpnpStateRemoving
  LinphoneUpnpStateNotAvailable
  LinphoneUpnpStateOk
  LinphoneUpnpStateKo
  LinphoneUpnpStateBlacklisted 
}
enum   _LinphoneGlobalState { 
  LinphoneGlobalOff
  LinphoneGlobalStartup
  LinphoneGlobalOn
  LinphoneGlobalShutdown
  LinphoneGlobalConfiguring 
}
enum   _LinphoneCoreLogCollectionUploadState { 
  LinphoneCoreLogCollectionUploadStateInProgress
  LinphoneCoreLogCollectionUploadStateDelivered
  LinphoneCoreLogCollectionUploadStateNotDelivered 
}
enum   _LinphoneConfiguringState { 
  LinphoneConfiguringSuccessful
  LinphoneConfiguringFailed
  LinphoneConfiguringSkipped 
}

 

函数

void  linphone_core_iterate (LinphoneCore *lc)
void  linphone_core_set_root_ca (LinphoneCore *lc, const char *path)
const char *  linphone_core_get_root_ca (LinphoneCore *lc)
void  linphone_core_verify_server_certificates (LinphoneCore *lc, bool_t yesno)
void  linphone_core_verify_server_cn (LinphoneCore *lc, bool_t yesno)
void *  linphone_core_get_user_data (const LinphoneCore *lc)
void  linphone_core_set_user_data (LinphoneCore *lc, void *userdata)
void  linphone_core_destroy (LinphoneCore *lc)
void  linphone_core_set_chat_database_path (LinphoneCore *lc, const char *path)
void  linphone_core_add_supported_tag (LinphoneCore *lc, const char *tag)
void  linphone_core_remove_supported_tag (LinphoneCore *lc, const char *tag)
const char *  linphone_stream_type_to_string (const LinphoneStreamType)
const char *  linphone_global_state_to_string (LinphoneGlobalState gs)
const char *  linphone_core_log_collection_upload_state_to_string (constLinphoneCoreLogCollectionUploadState lcus)
LinphoneCoreVTable *  linphone_core_v_table_new (void)
void  linphone_core_v_table_set_user_data (LinphoneCoreVTable *table, void *data)
void *  linphone_core_v_table_get_user_data (LinphoneCoreVTable *table)
LinphoneCoreVTable *  linphone_core_get_current_vtable (LinphoneCore *lc)
void  linphone_core_v_table_destroy (LinphoneCoreVTable *table)
LinphoneCore *  linphone_core_new (const LinphoneCoreVTable *vtable, const char *config_path, const char *factory_config_path, void *userdata)
LinphoneCore *  linphone_core_new_with_config (const LinphoneCoreVTable *vtable, LpConfig*config, void *userdata)
void  linphone_core_add_listener (LinphoneCore *lc, LinphoneCoreVTable *vtable)
void  linphone_core_remove_listener (LinphoneCore *lc, const LinphoneCoreVTable*vtable)
void  linphone_core_set_ssl_config (LinphoneCore *lc, void *ssl_config)
void  linphone_core_set_call_logs_database_path (LinphoneCore *lc, const char *path)
void  linphone_core_migrate_logs_from_rc_to_db (LinphoneCore *lc)
void  linphone_core_set_zrtp_secrets_file (LinphoneCore *lc, const char *file)
const char *  linphone_core_get_zrtp_secrets_file (LinphoneCore *lc)
void  linphone_core_set_user_certificates_path (LinphoneCore *lc, const char *path)
const char *  linphone_core_get_user_certificates_path (LinphoneCore *lc)
void  linphone_core_reload_ms_plugins (LinphoneCore *lc, const char *path)
int  linphone_core_get_max_calls (LinphoneCore *lc)
void  linphone_core_set_max_calls (LinphoneCore *lc, int max)
bool_t  linphone_core_media_encryption_supported (const LinphoneCore *lc,LinphoneMediaEncryption menc)
int  linphone_core_set_provisioning_uri (LinphoneCore *lc, const char *uri)
const char *  linphone_core_get_provisioning_uri (const LinphoneCore *lc)
void  linphone_core_set_friends_database_path (LinphoneCore *lc, const char *path)
void  linphone_core_migrate_friends_from_rc_to_db (LinphoneCore *lc)
int  linphone_core_migrate_to_multi_transport (LinphoneCore *lc)
  

    

详细说明


宏定义文档

  #define LC_SIP_TRANSPORT_DISABLED    0

   禁用使用LCSipTransports进行sip 传输

   #define LC_SIP_TRANSPORT_RANDOM     -1

   随机选择一个SIP端口,利用LCSipTransports进行传输

   

自定义类型文档

  typedef void(* DisplayMessageCb)(LinphoneCore *lc, const char *message)

   回调函数原型  (已弃用

   typedef void(* DisplayStatusCb)(LinphoneCore *lc, const char *message)

   回调函数原型  (已弃用

   typedef void(* DisplayUrlCb)(LinphoneCore *lc, const char *message, const char *url) 

   回调函数原型  (已弃用

   

  typedef struct _LCSipTransports LCSipTransports

      Libphone 核心 Sip传输端口. 和 linphone_core_set_sip_transports搭配使用


   typedef enum _LinphoneConfiguringState LinphoneConfiguringState

      LinphoneConfiguringState 描述了设置的状态:成功,失败,跳过


   typedef struct _LinphoneCore LinphoneCore

      Linephone 的核心主要对象由linphone_core_new()函数创建


   typedef void(* LinphoneCoreAuthInfoRequestedCb)(LinphoneCore *lc, const char *realm,

     const char *username, const char *domain)

      请求应用程序或者用户的身份验证信息的回调函数

     参数:

            lc            指向LinphoneCore对象的指针

            realm         身份验证必需的域

            username      用户名需要进行身份验证.应用程序应使用这个函数回调正在使用的linphone_core_add_auth_info

 

   typedef void(* LinphoneCoreBuddyInfoUpdateCb)(LinphoneCore *lc, LinphoneFriend *lf)

   回调函数原型


   typedef void(* LinphoneCoreCallEncryptionChangeCb)(LinphoneCore *lc, LinphoneCall *call, 

     bool_t on, const char *authentication_token)

      通话加密发生改变的回调

      参数:

             lc          LinphoneCore对象

              call        加密发生改变的通话对象

              on          加密是否激活

              authentication_token    一个authentication_token,目前只限于ZRTP加密


  type void(* LinphoneCoreCallLogUpdatedCb)(LinphoneCore *lc, LinphoneCallLog *newcl)

      回调通知添加了一个新的通话记录条目.这通常发生在通话终止后.

      参数

            lc          LinphoneCore对象

             newcl       新添加的通话记录条目


  type void(* LinphoneCoreCallStateChangedCb)(LinephoneCore *lc, LinephoneCall *call, 

LinphoneCallState cstate, const char *message)

    呼叫状态通知回调

    参数

             lc          LinphoneCore对象

             call        状态发生改变的呼叫对象

             cstate      呼叫对象的新状态

             message     一个关于状态的非NULL通知的消息 


  typedef void(* LinphoneCoreCallStatsUpdatedCb)(LinphoneCore *lc,LinphoneCall *call,

const LinphoneCallStats *stats)  

    为通话接受高性能的统计的回调

    参数

             lc         LinphoneCore对象

             call       通话对象

             stats      LinphoneCallStats对象


   typedef void(* LinphoneCoreCbFunc)(LinphoneCore *lc, void *user_data)

    回调函数原型


   typedef void(* LinphoneCoreConfiguringStatusCb)(LinphoneCore *lc, 

      LinphoneConfiguringState status, const char *message)

    配置状态更改通知的回调函数

    参数

              lc       LinphoneCore对象

              message  通知的消息

 

   typedef void(* LinphoneCoreDtmfReceivedCb)(LinphoneCore *lc, LinphoneCall *call, int dtmf)

   通知收到DTMFS的回调

   参数

            lc        LinphoneCore对象

            call      收到dtmf的LinphoneCall对象

            dtmf      dtmf的ascii代码


   typedef void(* LinphoneCoreFileTransferProgressIndicationCb)(LinphoneCore *lc,

      LinphoneChatMessage *message, const LinphoneContent *content, size_t offset, size_f total)

    文件传输进度提示的回调函数原型

    参数

          lc      LinphoneCore对象

          message LinphoneChatMessage 收到消息的正文

          content LinphoneContent 传入内容的信息

          offset  从文件传输开始,发送/接收字节数的比值

          total   发送/接收的字节总数

    

   typedef void(* LinphoneCoreFileTransferRecvCb)(LinphoneCore *lc,LinphoneChatMessage *message,

     const LinphoneContent *content, const char *buff, size_t size)

   文件传输接收回调函数原型,这个函数通过核心在一个已启动的传入的文件传输上被调用,在大文件的情况下,

这个函数也许对同一个文件调用几次

   参数

          lc       LinphoneCore对象

          message  LinphoneChatMessage 收到消息的正文

          content  LinphoneContent 传入内容的信息

          buff     指向接收到数据

          size     从buff中读取到的字节数,0表示文件结束


   typedef void(* LinphoneCoreFileTransferSendCb)(LinphoneCore *lc, LinphoneChatMessage *message, 

     const LinphoneContent *content, char* buff, size_t *size)

   文件传输发送的回调函数原型,这个函数通过核心在一个已启动传出的文件传输上被调用,这个函数一直被调用直到size被设置为0

   参数

           lc       LinphoneCore对象

           message  LinphoneChatMessage 收到消息的正文

           content  LinphoneContent 传出的内容

           buff     指向应用程序写入数据的缓冲区

           size     作为输入值,它代表框架所期待的字节数.作为输出值,它代表应用程序写入的字节数.0代表文件结束

  

   typedef void(* LinphoneCoreFriendListCreatedCb)(LinphoneCore *lc, LinphoneFriendList *list)

   该回调函数原型用于通知(或者报告),当一个好友列表被添加到核心好友列表时.

   参数

          [in]lc   LinphoneCore对象

          [in]list LinphoneFriendList对象


   typedef void(* LinphoneCordFriendListRemovedCb)(LinphoneCore *lc, LinphoneFriendList *list)

   该回调函数原型用于通知(或者报告),当一个好友列表从核心好友列表中被移除时.

   参数

         [in]lc   LinphoneCore对象

         [in]list LinphoneFriendList对象


   


  

   typedef void(* LinphoneCoreGlobalStateChangedCb)(LinphoneCore *lc, LinphoneGlobalState gstate,

     const char *message)

   全局状态通知回调

   参数

         lc    LinphoneCore对象

         gstate  全局状态

         message 通知的消息


   typedef void(* LinphoneCoreInfoReceivedCb)(LinphoneCore *lc, LinphoneCall *call, 

     const LinphoneInfoMessage *msg)

   接收消息的回调函数

        参数 

                    lc      LinphoneCore对象

                   call  拥有该消息的LinphoneCall对象

                   msg  消息对象


   typedef void(* LinphoneCoreIsComposingReceivedCb)(LinphoneCore *lc,LinphoneChatRoom *room)

    是写(或组织)通知回调函数

    参数

       [in]lc   LinphoneCore对象

         [in]room 参与对话的LinphoneChatRoom对象

 

   typedef void(* LinphoneCoreLogCollectionUploadProgressIndicationCb)(LinphoneCore *lc, size_t offset,

     size_t total)

   报告日志集上传进度显示的回调函数

   参数

       [in] lc   LinphoneCore对象

         [in] offset   已上传/总上传字节数的比例 

         [in] total   需要上传的总字数


   typedef enum _LinphoneCoreLogCollectionUploadState LinphoneCoreLogCollectionUploadState

     LinphoneCoreLogCollectionUploadState用于通知日志集上传是否成功


   typedef void(* LinphoneCoreLogCollectionUploadStateChangedCb)(LinphoneCore *lc, LinphoneCoreLogCollectionUploadState state,

     const char *info)

   报告日志集上传状态发生改变的回调函数

   参数

         [in] lc   LinphoneCore对象

         [in] state 日志集上传的状态

         [in] info  附加信息:如果是错误状态就为错误信息,如果是成功状态就为已上传文件的URL

  

   typedef void(* LinephoneCoreMessageReceiveCb)(LinphoneCore *lc, LinphoneChatRoom *room,

     LinphoneChatMessage *message)

   聊天信息的回调函数

   参数

        lc     LinphoneCore对象

          room   参与这次对话的LinphoneChatRoom对象,如果不存在任何一个聊天室对象,可以由框架创建

          message 传入的信息


   typedef void(* LinphoneCoreNetworkReachableCb)(LinphoneCore *lc, bool_t reachable)

   报告网络变化情况由linphone_core_set_network_reachable自动检测或者通知

   参数

         lc     LinphoneCore对象

          reachable 如果网络可用,为true.


   typedef void(* LinphoneCoreNewSubscriptionRequestedCb)(LinphoneCore *lc, LinphoneFriend *lf,

     const char *url)

   通知收到一个新的订阅请求,并且等待决定.订阅请求的状态由这个好友通过改变策略来通知

   参数

          lc  LinphoneCore对象

           lf  LinphoneFriend对象 对应订阅者

           url 订阅者回调函数的url


   typedef void(* LinphoneCoreNotifyPresenceReceivedCb)(LinphoneCore *lc, LinphoneFriend *lf)

   通知好友状态改变 

   参数

         lc  LinphoneCore对象

         lf  更新后的LinphoneFriend对象


      typedef void(* LinphoneCoreRegistrationStateChangedCb)(LinphoneCore *lc, LinphoneProxyConfig *cfg,

     LinphoneRegistrationState cstate, const char *message)

   注册状态通知回调函数


   typedef void(* LinphoneCoreTextMessageReceivedCb)(LinphoneCore *lc, LinphoneChatRoom *room,

     LinphoneAddress *from, const char *message)

   回调函数原型(已弃用

        用 LinphoneCoreMessageReceivedCb 代替

        参数

                    lc   LinphoneCore对象

                    room   参与对话的LinphoneChatRoom对象,如果不存在任何一个聊天室对象,可以由框架创建

           from  LinphoneAddress对象

           message  传入的信息


   typedef void(* LinphoneCoreTransferStateChangeCb)(LinphoneCore *lc, LinphoneCall *transfered,

     LinphoneCallState new_call_state)

   通知转移进度的回调函数

   参数 

        lc LinphoneCore对象

        transfered 呼叫被转移的LinphoneCall对象

        new_call_state 在远端转移目标呼叫的状态


  typedef struct _LinphoneCoreVTable LinphoneCoreVTable

  该结构包含了应用程序应该实现的所有回调函数.没有任何一个是强制性的.

  

  typedef enum _LinphoneGlobalState LinphoneGlobalState

  LinphoneGlobalState描述了LinphoneCore对象的全局状态.它通过LinphoneCoreVTable::global_state_changed来通知


  typedef enum _LinphoneIceState LinphoneIceState

  描述Ice状态的枚举


     typedef enum _LinphoneStreamType LinphoneStreamType

  描述流类型的枚举


  typedef enum _LinphoneUpnpState LinphoneUpnpState

  描述uPnP状态的枚举

  

  typedef void(* ShowInterfaceCb)(LinphoneCore *lc)

  回调函数原型(已弃用

 


   

枚举类型文档



 enum _LinphoneConfiguringState

  LinphoneConfiguringState描述系统设置状态,它由_LinphoneCoreVTable::registration_state_changed通知


  enum _LinphoneCoreLogCollectionUploadState

  LinphoneCoreLogCollectionUploadState 用来通知日志集上传是否成功

  Enumerator(枚举常量):

                       LinphoneCoreLogCollectionUploadStateInProgress      0 正在上传

                       LinphoneCoreLogCollectionUploadStateDelivered       1 日志集成功地上传并通过远程端点确认

                          LinphoneCoreLogCollectionUploadStateNotDelivered    2 日志集上传不了



  enum _LinphoneGlobalState

  LinphoneGlobalState 描述了LinphoneCore对象的全局状态,它是通过LinphoneCoreVTable::global_state_changed来通知的


  enum _LinphoneIceState

  描述ICE(交互式连通建立方式ICE(Interactive Connectivity Establishment))的状态

  枚举常量:

          LinphoneIceStateNotActivated         0          在这个通话或者数据流上ICE没有激活

           LinphoneIceStateFailed               1          ICE处理失败

           LinphoneIceStateInProgress           2          ICE正在处理

           LinphoneIceStateHostConnection       3          ICE已经和一个远程主机建立了连接

           LinphoneIceStateReflexiveConnection  4          ICE已经通过一个或者多个NAT和远程主机建立连接

           LinphoneIceStateRelayConnection      5          ICE已经通过一个中继器和远程主机建立连接


  enum _LinphoneStreamType

  描述流类型的枚举


  enum _LinphoeUpnpState

  描述uPnP状态的枚举(UPnP协议即通用即插即用英文是Universal Plug and Play)

     枚举常量

                        LinphoneUpnpStateIdle                               0                           uPnP未激活

                        LinphoneUpnpStatePending                        1                           uPnP处理正在进行中

                        LinphoneUpnpStateAdding                          2                           内部使用:只能通过端口绑定来使用

                        LinphoneUpnpStateRemving                       3                           内部使用:只能通过端口绑定来使用

                        LinphoneUpnpStateNotAvailable                 4                            uPnP不可用

                        LinohoneUpnpStateOk                               5                            uPnP已启用

                        LinphoneUpnpStateKo                               6                            uPnP处理失败

                        LinphoneUpnpStateBlacklisted                  7                             IGD路由器被列入黑名单

   


函数文档

     

  void linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable)

        通知linphone核心项目添加一个监听器.一旦接收到事件,然后调用已注册的Vtable

        参数

                          lc           LinphoneCore对象

                        vtable     LinphoneCoreVTable 结构体包括了应用程序的回调函数,对象属于linphone核心直到调用linephone_core_remove_listener.

        

   void linphone_core_add_supported_tag(LinphoneCore *lc, const char* tag)

   这个函数通过核心去控制信号的特性,这些特性通常被包含在SIP的头部

   参数

                         lc            LinphoneCore对象

                         tag'        特性标记名称

        

   void linephone_core_destroy(LinphoneCore *lc)

   销毁LinphoneCore对象

   参数

         lc    需要被销毁的LinphoneCore对象


   LinphoneCoreVTable* linphone_core_get_current_vtable(LinphoneCore *lc)

   获取当前的VTable.这意味着只有一个回调可以获取到user_data(回调的vtable相对应)

   参数

        lc    LinphoneCore对象

   返回

        最后调用回调的Vtable  

 

   int linphone_core_get_max_calls(LinphoneCore *lc)

   获取Linphone核心可以同时管理的最大并发数

   参数

         lc    LinphoneCore对象

   返回  

         最大并发数


   const char* linphone_core_get_provisioning_uri(const LinphoneCore *lc)

   获取配置(供应)的URI

   参数

          lc   LinphoneCore对象

   返回

          配置的URI


   const char* linphone_core_get_root_ca(LinphoneCore *lc)

   获取包含可信任根CA(PEM格式)的文件或者文件夹的路径

         参数

                         lc   LinphoneCore对象


   const char* linphone_core_get_user_certificates_path(LinphoneCore *lc)

        获取存储了用户证书的目录路径

   参数

       [in]lc  LinphoneCore对象

   返回

       存储用户证书的目录路径


   void linphone_core_get_user_data(const LinphoneCore *lc)

   获取用户的指针(由linphone_core_new()赋予的)


   const char* linphone_core_get_zrtp_secrets_file(LinphoneCore *lc)

   获取存储zrtpm密钥iy缓存的文件路径

   参数

                     [in]   lc         LinphoneCore对象

         返回

                    保存zrtp隐藏缓存的文件路径


        void linphone_core_iterate(LinphoneCore *lc)

   主循环函数.你的应用程序定期调用它是至关重要的

   linphone_core_iterate()执行各种后台任务:

   SIP消息的接收

   处理定时器和超时

   执行代理注册

   在这个主循环必须定期调用该函数重新身份验证.要注意的是这个函数必须和其他liblinphone函数在同一线程调用,如果不是同一线程调用,

要确保互所有liblinphone序列化互斥调用


   bool_t linphone_core_media_encryption_supported(const LinphoneCore *lc, LinphoneMeidaEncryption menc)

   检查是否支持某个媒体加密类型

   参数

            lc   LinphoneCore对象

            menc LinphoneMediaEncryption

   返回

            LinphoneCore引擎是否支持该媒体加密方案


   void linephone_core_migrate_friends_from_rc_to_db(LinphoneCore *lc)

   把没有入库的好友从linphonerc迁移到数据库

   参数

            lc LinphoneCore对象

  
   void linephone_core_migrate_logs_from_rc_to_db(LinphoneCore *lc)

   把没有入库的日志从linphonerc中迁移到数据库

   参数 

            lc LinphoneCore对象


   int linphone_core_migrate_to_multi_transport(LinphoneCore *lc)

   迁移配置以便启用所有SIP传输,3.7以下版本的linphone不支持同时使用多个SIP传输.这个函数帮助应用程序迁移配置以便启动所有的传输.

现有的代理配置被添加到传输参数以便他们继续使用以前的独特设置.该函数必须在刚刚创建core之后调用,在任何调用linphone_core_iterate()之前

  参数

          lc LinphoenCore对象

  返回

          如果已经迁移返回 1     如果没有迁移是因为没必要或者已经完成迁移放回 0

           如果出错 -1

   

   

  LinphoneCore* linphone_core_new(const LinphoneCoreVTable *vtable, const char* config_path,

       const char* factory_config_path, void* userdata)

    实例化一个LinphoneCore对象

  LinphoneCore对象是控制所有手机行为的主要句柄,它应该在你的应用程序中是唯一的

  参数

        vtable  LinphoneCoreVTable结构体控制应用程序的所有回调函数

        config_path   配置文件路径,如果不存在该路径会被创建.配置文件用于存储所有设置、通话记录、好友、代理...

                     以便于所有这些设置持续存活在LinphoneCore对象的生命周期中.允许设置一个NULL值,这样就不保存

                     任何设置

        factory_config_path  只读的配置文件路径,用来保存硬编码偏好例如代理设置或者内部偏好,在工厂模式文件上的设置

                          都会覆盖掉正常配置文件上的设置.它是可选的,如果没必要可设置为NULL值

        userdata      一个不透明的用户指针,可以使用linphone_core_get_user_data()随时获取(例如在回调时)

  另请参阅

     linphone_core_new_with_config


    LinphoneCore* linphone_core_new_with_config(const LinphoneCoreVTable* vtable, LpConfig* config, void* userdata)

实例化一个LinphoneCore对象(附带一个配置对象指针)

LinphoneCore对象是控制所有手机行为的主要句柄,它应该在你的应用程序中是唯一的

参数

       vtable  LinphoneCoreVTable结构体控制应用程序的所有回调函数

       config   一个指向LpConfig对象的指针,其包含了LinphoneCore实例化的配置

       userdata      一个不透明的用户指针,可以使用linphone_core_get_user_data()随时获取(例如在回调时)   

另请参阅

    linphone_core_new

 

void linphone_core_set_call_logs_database_path(LinphoneCore* lc, const char* path)

设置存储通话记录的数据库文件路径.如果不存在会被创建

参数

           lc   LinphoneCore对象

           path  数据库文件路径


void linphone_core_set_chat_database_path(LinphoneCore* lc, const char* path)

设置存储聊天信息的数据库文件路径.如果不存在会被创建

参数

           lc  LinphoneCore对象

           path  数据库文件路径


void linphone_core_set_friends_database_path(LinphoneCore* lc, const char* path)

设置存储好友的数据库文件路径.如果不存在会被创建    

参数

          lc   LinphoneCore对象

          path  数据库文件路径


void linphone_core_set_max_calls(LinphoneCore* lc, int max)

设置可以同时管理的最大并发量.超过这个限制的新通话被告知用户正忙

参数

          lc   LinphoneCore对象

          max  最大并发通话数量


int linphone_core_set_provisioning_uri(LinphoneCore* lc, const char* uri)

   设置一个URI,在启动程序时会从那里下载xml配置文件.这也可以在配置文件或者出厂配置文件中的

[misc]中“config-uri”项中设置.调用这个函数不加载配置.它会将值写入配置文件以便从远程的URI配置

下一个新建的LinphoneCore

参数

         lc   LinphoneCore对象

          uri  用来下载配置文件的http或者https uri.设置为NULL将禁用远程配置


返回

         如果uri无法解析 返回-1,其他返回0.注意的是这并不检查URI端点有效性,无方案,并且下载仍可能失败



void linphone_core_set_root_ca(LinphoneCore* lc, const char* path)

设置包含可信任的根CA的文件或者文件夹路径(PEM格式)

参数

        path       文件路径

        lc         LinphoneCore对象


void linphone_core_set_ssl_config(LinphoneCore* lc, void* ssl_config)

设置一个指针指向一个外部提供针对加密库的ssl配置   SSL(Secure Sockets Layer 安全套接层)协议

参数

                   lc         LinphoneCore对象

    [in] ssl_config    一个指针指向一个被直接提供加密库用于bctoolbox的结构体.使用额外的服务.这个ssl_config结构和调用者相关联

连接结束不会被释放.


void linphone_core_set_user_certificates_path(LinphoneCore *lc, const char* path)

设置路径目录存储用户的x509 证书(通过DTLS协议)DTLS(Datagram Transport Layer Security)即数据包传输层安全性协议

参数     

      [in] lc     LinphoneCore对象

      [in] path   存储用户证书的目录路径


void linphone_core_set_user_data(LinphoneCore* lc, void* userdata)

将一个用户指针关联到LinphoneCore对象上


void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file)

设置保存zrtp密钥缓存的文件路径.


void linphone_core_v_table_destroy(LinphoneCoreVTable *table)

销毁一个vtable对象

参数

     table  被销毁的LinphoneCoreVTable对象


void* linphone_core_v_table_get_user_data(LinphoneCoreVTable* table)

获取一个在vtable对象上的用户数据指针

参数

       table   LinphoneCoreVTable对象

返回

             附加在VTable上的数据


LinphoneCoreVTable* linphone_core_v_table_new(void)

实例化一个LinphoneCoreVTable对象,所有参数设置为NULL

返回

       新分配的vtable



void linphone_core_v_table_set_user_data(LinphoneCoreVTable* table, void* data)

为vtable设置一个用户数据指针

参数

       table        LinphoneCoreVTable对象

        data         附加的用户数据


void linphone_core_verify_server_certificates(LinphoneCore* lc, bool_t yesno)

指定当连接到一个SIP/TLS服务器时,是否验证服务器的tls证书


void linphone_core_verify_server_cn(LinphoneCore* lc, bool_t yesno)

指定当连接一个SIP/TLS服务器时,是否验证tls服务器证书常见的名称(通用名)


const char* linphone_stream_type_to_string(const LinphoneStreamType)

返回LinphoneStreamType值的字符串



### 回答1: python-3.9.1-amd64.exe是Python编程语言的一个版本,于2020年12月7日发布。这是一个64位的可执行文件,可以在Windows操作系统上运行。Python是一种通用的高级编程语言,被广泛用于开发应用程序、网站和数据分析。Python-3.9.1-amd64.exe是Python编程语言的官方发布版本,包含了Python解释器和一些常用的标准库。通过安装这个可执行文件,用户可以在Windows系统上使用Python进行程序开发。 Python-3.9.1-amd64.exe安装包的下载和安装过程相对简单。用户可以从Python官方网站下载这个安装包,并按照提示完成安装。安装过程中,可以选择自定义安装选项,例如安装路径和添加系统路径。安装完成后,用户可以通过命令行或者集成开发环境(IDE)来运行Python程序。 Python-3.9.1-amd64.exe版本带来了许多新的功能和改进。例如,增加了对字节码直接下降为机器码的实验性支持,提高了某些场景下的性能;还引入了对时间的新类型模块zoneinfo的支持,用于更好地处理时区相关的操作;此外,还对异常链的语义进行了改变,使其在异常处理和报告中更加直观和有用。 总之,Python-3.9.1-amd64.exe是Python编程语言的一个稳定和可靠的版本,用于在64位Windows操作系统上进行Python程序开发。用户可以通过下载和安装这个可执行文件,体验到Python最新版本的特性和改进。无论是初学者还是有经验的开发者,Python都是一门易学且功能强大的编程语言,通过这个版本的安装包,我们可以轻松地进行Python开发。 ### 回答2: Python 3.9.1-amd64.exe是Python编程语言的安装文件。Python是一种高级编程语言,被广泛应用于软件开发、数据分析、人工智能等领域。Python 3.9.1-amd64.exe是适用于64位操作系统的安装程序。 通过运行Python 3.9.1-amd64.exe,可以将Python解释器和相关的开发环境安装到计算机上。Python解释器是一种可以执行Python代码的程序,它可以解释和执行Python语言编写的程序。安装Python后,我们可以使用Python语言编写程序,并通过解释器执行,从而实现各种功能。 Python 3.9.1-amd64.exe安装程序包含了Python解释器以及相关的标准库和工具。标准库是一组已经编写好的Python模块,提供了丰富的功能和方法,可以帮助我们快速开发程序。同时,还可以使用第三方库和模块来扩展Python的功能,例如科学计算、Web开发、数据可视化等领域。 安装Python 3.9.1-amd64.exe很简单,只需要双击运行安装程序,并按照提示完成安装。安装完成后,我们就可以在命令行或集成开发环境中调用Python解释器,并开始编写和执行Python程序了。 总结来说,Python 3.9.1-amd64.exe是一种用于安装Python 3.9.1版本的64位操作系统的安装程序。通过安装Python,我们可以使用Python语言编写程序,并利用Python解释器执行这些程序,开发各种应用和解决各种问题。 ### 回答3: python-3.9.1-amd64.exe是Python编程语言的一个版本。Python是一种高级编程语言,具有简单易学、可读性强等特点,广泛应用于各种领域的软件开发和数据分析。 Python 3.9.1是Python的一个主要版本,它带来了新的功能和改进。这个版本是在2020年12月发布的,它修复了早期版本中的一些漏洞和问题,并增加了一些新的特性和改进。其中,amd64表示该版本适用于64位的AMD架构处理器。 执行文件(.exe)表示这是一个可执行文件,它可以在Windows操作系统上直接运行。通过运行python-3.9.1-amd64.exe,用户可以安装Python 3.9.1版本到自己的计算机上。 安装Python 3.9.1后,用户可以使用Python编写和运行自己的程序。Python具有丰富的标准库和第三方库,可以用于开发各种类型的应用程序,包括Web开发、科学计算、机器学习和人工智能等。 这个版本带来了许多新的特性和改进,包括语言增强、性能优化、库更新等。同时,该版本也修复了一些早期版本中存在的问题,提高了Python的稳定性和可靠性。 总而言之,python-3.9.1-amd64.exe是Python编程语言的一个版本,用户可以通过运行它来安装Python 3.9.1版本,并使用Python开发各种类型的应用程序。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值