From 6a99d9bf65aa5878cb409945ed2bdbdcb916d047 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期五, 02 九月 2022 14:56:40 +0800 Subject: [PATCH] 更新linphone sdk --- HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/linphone-sdk/apple-darwin/Frameworks/linphone.framework/Headers/api/c-types.h | 378 +++++++++++++++++++++++++++++++++-------------------- 1 files changed, 234 insertions(+), 144 deletions(-) diff --git "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/linphone-sdk/apple-darwin/Frameworks/linphone.framework/Headers/api/c-types.h" "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/linphone-sdk/apple-darwin/Frameworks/linphone.framework/Headers/api/c-types.h" old mode 100644 new mode 100755 index acbe828..5f5b9c9 --- "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/linphone-sdk/apple-darwin/Frameworks/linphone.framework/Headers/api/c-types.h" +++ "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/linphone-sdk/apple-darwin/Frameworks/linphone.framework/Headers/api/c-types.h" @@ -26,6 +26,7 @@ #include "linphone/enums/call-enums.h" #include "linphone/enums/chat-message-enums.h" #include "linphone/enums/chat-room-enums.h" +#include "linphone/enums/conference-enums.h" #include "linphone/enums/encryption-engine-enums.h" #include "linphone/enums/event-log-enums.h" #include "linphone/enums/security-event-enums.h" @@ -52,34 +53,134 @@ #define TRUE 1 #define FALSE 0 -// ============================================================================= -// C Structures. -// ============================================================================= +// ----------------------------------------------------------------------------- +// Authentication. +// ----------------------------------------------------------------------------- + +/** + * @brief Object holding authentication information. + * + * In most case, authentication information consists of a username and password. + * If realm isn't set, it will be deduced automatically from the first authentication challenge as for the hash algorithm. + * Sometimes, a userid is required by the proxy and then domain can be useful to discriminate different credentials. + * You can also use this object if you need to use a client certificate. + * + * Once created and filled, a #LinphoneAuthInfo must be added to the #LinphoneCore in + * order to become known and used automatically when needed. + * Use linphone_core_add_auth_info() for that purpose. + * + * The #LinphoneCore object can take the initiative to request authentication information + * when needed to the application through the authentication_requested() callback of it's #LinphoneCoreCbs. + * + * The application can respond to this information request later using + * linphone_core_add_auth_info(). This will unblock all pending authentication + * transactions and retry them with authentication headers. + * + * @ingroup authentication +**/ +typedef struct _LinphoneAuthInfo LinphoneAuthInfo; // ----------------------------------------------------------------------------- // Address. // ----------------------------------------------------------------------------- /** - * Object that represents a SIP address. + * @brief Object that represents a parsed SIP address. * - * The #LinphoneAddress is an opaque object to represents SIP addresses, ie - * the content of SIP's 'from' and 'to' headers. * A SIP address is made of display name, username, domain name, port, and various * uri headers (such as tags). It looks like 'Alice <sip:alice@example.net>'. + * + * You can create an address using linphone_factory_create_address() or linphone_core_interpret_url() + * and both will return a NULL object if it doesn't match the grammar defined by the standard. + * + * This object is used in almost every other major objects to identity people (including yourself) & servers. + * * The #LinphoneAddress has methods to extract and manipulate all parts of the address. - * When some part of the address (for example the username) is empty, the accessor methods - * return NULL. * @ingroup linphone_address */ typedef struct _LinphoneAddress LinphoneAddress; + +// ----------------------------------------------------------------------------- +// Conference. +// ----------------------------------------------------------------------------- + +/** + * @brief TODO + * @ingroup conferencing + */ +typedef struct _LinphoneConference LinphoneConference; + +/** + * @brief TODO + * @ingroup conferencing + */ +typedef struct _LinphoneConferenceParams LinphoneConferenceParams; + +/** + * @brief An object to handle the callbacks for the handling a #LinphoneConference objects. + * + * Use linphone_factory_create_conference_cbs() to create an instance. + * Then pass the object to a #LinphoneConference instance through linphone_conference_add_callbacks(). + * @ingroup conferencing + */ +typedef struct _LinphoneConferenceCbs LinphoneConferenceCbs; + +// ----------------------------------------------------------------------------- +// Participants. +// ----------------------------------------------------------------------------- + +/** + * @brief Identifies a member of a #LinphoneConference or #LinphoneChatRoom. + * + * A participant is identified by it's SIP address. + * It can have many #LinphoneParticipantDevice. + * @ingroup conference + */ +typedef struct _LinphoneParticipant LinphoneParticipant; + +/** + * @brief This object represents a unique device for a member of a #LinphoneConference or #LinphoneChatRoom. + * + * Devices are identified by the gruu parameter inside the #LinphoneAddress which can be obtained by linphone_participant_device_get_address(). + * It is specially usefull to know the security level of each device inside an end-to-end encrypted #LinphoneChatRoom. + * + * You can get a list of all #LinphoneParticipantDevice using linphone_participant_get_devices(). + * @ingroup conference + */ +typedef struct _LinphoneParticipantDevice LinphoneParticipantDevice; + +/** + * @brief This object represents the delivery/display state of a given chat message for a given participant. + * + * It also contains a timestamp at which this participant state has changed. + * + * Use linphone_chat_message_get_participants_by_imdn_state() to get all #LinphoneParticipantImdnState for a given state. + * From there use linphone_participant_imdn_state_get_participant() to get the #LinphoneParticipant object if you need it. + * @ingroup conference + */ +typedef struct _LinphoneParticipantImdnState LinphoneParticipantImdnState; + +/** + * @brief This object is only used on server side for #LinphoneChatRoom with #LinphoneChatRoomBackendFlexisipChat backend. + * @ingroup conference + */ +typedef struct _LinphoneParticipantDeviceIdentity LinphoneParticipantDeviceIdentity; // ----------------------------------------------------------------------------- // Call. // ----------------------------------------------------------------------------- /** - * The #LinphoneCall object represents a call issued or received by the #LinphoneCore + * @brief This object represents a call issued or received by the #LinphoneCore. + * + * You may have multiple calls at the same time, but only one will be + * in #LinphoneCallStateStreamsRunning at any time unless they are merged into a #LinphoneConference, + * others will be paused. + * + * You can get the #LinphoneCallState of the call using linphone_call_get_state(), + * it's current #LinphoneCallParams with linphone_call_get_current_params() and + * the latest statistics by calling linphone_call_get_audio_stats() or linphone_call_get_video_stats(). + * * @ingroup call_control */ typedef struct _LinphoneCall LinphoneCall; @@ -88,7 +189,7 @@ typedef void (*LinphoneCallCbFunc) (LinphoneCall *call, void *ud); /** - * That class holds all the callbacks which are called by #LinphoneCall objects. + * @brief That class holds all the callbacks which are called by #LinphoneCall objects. * * Use linphone_factory_create_call_cbs() to create an instance. Then, call the * callback setters on the events you need to monitor and pass the object to @@ -97,54 +198,152 @@ */ typedef struct _LinphoneCallCbs LinphoneCallCbs; +/** + * @brief An object containing various parameters of a #LinphoneCall. + * + * You can specify your params while answering an incoming call using linphone_call_accept_with_params() + * or while initiating an outgoing call with linphone_core_invite_address_with_params(). + * + * This object can be created using linphone_core_create_call_params(), using NULL for the call pointer if you plan to use it for an outgoing call. + * + * For each call, three #LinphoneCallParams are available: yours, your correspondent's + * and the one that describe the current state of the call that is the result of the negociation between the previous two. + * For example, you might enable a certain feature in your call param but this feature can be denied in the remote's configuration, hence the difference. + * + * @see linphone_call_get_current_params(), linphone_call_get_remote_params() and linphone_call_get_params(). + * @ingroup call_control +**/ +typedef struct _LinphoneCallParams LinphoneCallParams; + +/** + * @brief Object used to keep track of all calls initiated, received or missed. + * + * It contains the call ID, date & time at which the call took place and it's duration (0 if it wasn't answered). + * You can also know if video was enabled or not or if it was a conference, as well as it's average quality. + * + * If needed, you can also create a fake #LinphoneCallLog using linphone_core_create_call_log(), + * otherwise use linphone_core_get_call_logs() or even linphone_call_get_call_log() to get the log of an ongoing call. + * + * @ingroup call_logs +**/ +typedef struct _LinphoneCallLog LinphoneCallLog; + +// ----------------------------------------------------------------------------- +// Audio. +// ----------------------------------------------------------------------------- + +/** + * @brief Object holding audio device information. + * + * It contains the name of the device, it's type if available (Earpiece, Speaker, Bluetooth, etc..) + * and capabilities (input, output or both) the name of the driver that created it (filter in mediastreamer). + * + * You can use the #LinphoneAudioDevice objects to configure default input/output devices or do it dynamically during a call. + * + * To get the list of available devices, use linphone_core_get_audio_devices(). This list will be limited to one device of each type. + * Use linphone_core_get_extended_audio_devices() for a complete list. + * + * @ingroup audio +**/ +typedef struct _LinphoneAudioDevice LinphoneAudioDevice; + // ----------------------------------------------------------------------------- // ChatRoom. // ----------------------------------------------------------------------------- /** - * An chat message is the object that is sent and received through LinphoneChatRooms. + * @brief An chat message is the object that is sent or received through a #LinphoneChatRoom. + * + * To create a #LinphoneChatMessage, use linphone_chat_room_create_empty_message(), + * then either add text using linphone_chat_message_add_utf8_text_content() or a + * #LinphoneContent with file informations using linphone_chat_message_add_file_content(). + * A valid #LinphoneContent for file transfer must contain a type and subtype, the name of the file and it's size. + * Finally call linphone_chat_message_send() to send it. + * + * To send files through a #LinphoneChatMessage, you need to have configured a file transfer server URL with linphone_core_set_file_transfer_server(). + * On the receiving side, either use linphone_chat_message_download_content() to download received files or enable auto-download in the #LinphoneCore using + * linphone_core_set_max_size_for_auto_download_incoming_files(), -1 disabling the feature and 0 always downloading files no matter it's size. + * + * Keep in mind a #LinphoneChatMessage created by a #LinphoneChatRoomBackendBasic #LinphoneChatRoom can only contain one #LinphoneContent, either text or file. * @ingroup chatroom */ typedef struct _LinphoneChatMessage LinphoneChatMessage; /** - * An object to handle the callbacks for the handling a #LinphoneChatMessage objects. + * @brief An object to handle the callbacks for the handling a #LinphoneChatMessage objects. * @ingroup chatroom */ typedef struct _LinphoneChatMessageCbs LinphoneChatMessageCbs; /** - * A chat room is the place where text messages are exchanged. - * Can be created by linphone_core_create_chat_room(). + * @brief A chat room is the place where #LinphoneChatMessage are exchanged. + * + * To create (or find) a #LinphoneChatRoom, you first need a #LinphoneChatRoomParams object. + * A chat room is uniquely identified by it's local and remote SIP addresses, meaning you can + * only have one chat room between two accounts (unless the backend is #LinphoneChatRoomBackendFlexisipChat). + * Then you can call linphone_core_search_chat_room() or linphone_core_create_chat_room_6(). + * + * Be careful as a #LinphoneChatRoomBackendFlexisipChat backend #LinphoneChatRoom will be created asynchronously, so + * make sure you add a #LinphoneChatRoomCbs to the returned object to be notified + * when it will be in state #LinphoneChatRoomStateCreated. + * + * All chat rooms are loaded from database when the #LinphoneCore starts, and you can get them using + * linphone_core_get_chat_rooms(). This method doesn't return empty chat rooms nor ones for which the local address + * doesn't match an existing #LinphoneProxyConfig identity, unless you specify otherwise in the [misc] section + * of your configuration file by setting hide_empty_chat_rooms=0 and/or hide_chat_rooms_from_removed_proxies=0. * @ingroup chatroom */ typedef struct _LinphoneChatRoom LinphoneChatRoom; /** - * An object to handle a chat room parameters. - * Can be created with linphone_core_get_default_chat_room_params() or linphone_chat_room_params_new(). + * @brief Object defining parameters for a #LinphoneChatRoom. + * + * Can be created with linphone_core_create_default_chat_room_params(). + * You can use linphone_chat_room_params_is_valid() to check if your configuration is valid or not. + * + * If the #LinphoneChatRoom backend is #LinphoneChatRoomBackendBasic, then no other parameter is required, + * but #LinphoneChatMessage sent and received won't benefit from all features a #LinphoneChatRoomBackendFlexisipChat can offer + * like conversation with multiple participants and a subject, end-to-end encryption, ephemeral messages, etc... + * but this type is the only one that can interoperate with other SIP clients or with non-flexisip SIP proxies. * @ingroup chatroom */ typedef struct _LinphoneChatRoomParams LinphoneChatRoomParams; /** - * A mask of #LinphoneChatRoomCapabilities + * @brief A mask of #LinphoneChatRoomCapabilities * @ingroup chatroom */ typedef int LinphoneChatRoomCapabilitiesMask; /** - * An object to handle the callbacks for the handling a #LinphoneChatRoom objects. + * @brief An object to handle the callbacks for the handling a #LinphoneChatRoom objects. * @ingroup chatroom */ typedef struct _LinphoneChatRoomCbs LinphoneChatRoomCbs; + +/** + * @brief Object holding chat message data received by a push notification on iOS platform only. + * + * This object is a subset of #LinphoneChatMessage, so only a few methods of it's parent are available, + * like linphone_push_notification_message_get_text_content() and linphone_push_notification_message_get_subject(), + * just enough to be able to build a notification to show the user. + * @ingroup chatroom +**/ +typedef struct _LinphonePushNotificationMessage LinphonePushNotificationMessage; // ----------------------------------------------------------------------------- // EventLog. // ----------------------------------------------------------------------------- /** - * Base object of events. + * @brief Object that represents an event that must be stored in database. + * + * For example, all chat related events are wrapped in an #LinphoneEventLog, + * and many callbacks use this kind of type as parameter. + * + * Use linphone_event_log_get_type() to get the #LinphoneEventLogType it refers to, + * and then you can use one of the accessor methods to get the underlying object, + * for example linphone_event_log_get_chat_message() for a #LinphoneChatMessage. * @ingroup events */ typedef struct _LinphoneEventLog LinphoneEventLog; @@ -154,149 +353,40 @@ // ----------------------------------------------------------------------------- /** - * The LinphoneContent object holds data that can be embedded in a signaling message. + * @brief This object holds data that can be embedded in a signaling message. + * + * Use linphone_core_create_content() to create it, and then you should set at least it's + * type and subtype and fill the buffer with your data. + * + * A #LinphoneContent can be multipart (contain other contents), have file information (name, path, size), + * be encrypted, have custom headers, etc... + * + * It is mainly used to send information through a #LinphoneChatMessage. * @ingroup misc */ typedef struct _LinphoneContent LinphoneContent; /** - * Represents a dial plan + * @brief Represents a dial plan * @ingroup misc */ typedef struct _LinphoneDialPlan LinphoneDialPlan; +// ----------------------------------------------------------------------------- +// Search. +// ----------------------------------------------------------------------------- + /** - * A #LinphoneMagicSearch is used to do specifics searchs + * @brief A #LinphoneMagicSearch is used to do specifics searchs * @ingroup misc */ typedef struct _LinphoneMagicSearch LinphoneMagicSearch; /** - * @ingroup misc - */ -typedef struct _LinphoneParticipant LinphoneParticipant; - -/** - * The LinphoneParticipantImdnState object represents the state of chat message for a participant of a conference chat room. - * @ingroup misc - */ -typedef struct _LinphoneParticipantImdnState LinphoneParticipantImdnState; - -/** - * @ingroup misc - */ -typedef struct _LinphoneParticipantDevice LinphoneParticipantDevice; - -/** - * @ingroup misc - */ -typedef struct _LinphoneParticipantDeviceIdentity LinphoneParticipantDeviceIdentity; - -/** - * The LinphoneSearchResult object represents a result of a search + * @brief The LinphoneSearchResult object represents a result of a search * @ingroup misc */ typedef struct _LinphoneSearchResult LinphoneSearchResult; - -// ============================================================================= -// C Enums. -// ============================================================================= - -// ----------------------------------------------------------------------------- -// How-to: Declare one enum -// -// 1. Declare a macro like this example in include/linphone/enums/chat-message-enums.h: -// -// #define L_ENUM_VALUES_CHAT_MESSAGE_DIRECTION(F) \ // -// F(Incoming /**< Incoming message */) \ // -// F(Outgoing /**< Outgoing message */) -// -// 2. And in this file, call L_DECLARE_C_ENUM with the enum name and values as params: -// -// L_DECLARE_C_ENUM(ChatMessageDirection, L_ENUM_VALUES_CHAT_MESSAGE_DIRECTION); -// -// 3. Do not forget to replace each single quote (with ') or other special char like -// to an escaped sequence. Otherwise you get this error at compilation: -// -// [ 99%] Building CXX object wrappers/cpp/CMakeFiles/linphone++.dir/src/linphone++.cc.o -// c++: error: WORK/desktop/Build/linphone/wrappers/cpp/src/linphone++.cc: No such file or directory -// c++: fatal error: no input files -// compilation terminated. -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// Call. -// ----------------------------------------------------------------------------- - -/** - * #LinphoneCallState enum represents the different states a call can reach into. - * The application is notified of a state change through the LinphoneCoreVTable::call_state_changed callback. - * @ingroup call_control - */ -L_DECLARE_C_ENUM(CallState, L_ENUM_VALUES_CALL_SESSION_STATE); - -// ----------------------------------------------------------------------------- -// ChatRoom. -// ----------------------------------------------------------------------------- - -/** - * #LinphoneChatMessageDirection is used to indicate if a message is outgoing or incoming. - * @ingroup chatroom - */ -L_DECLARE_C_ENUM(ChatMessageDirection, L_ENUM_VALUES_CHAT_MESSAGE_DIRECTION); - -/** - * #LinphoneChatMessageState is used to notify if messages have been successfully delivered or not. - * @ingroup chatroom - */ -L_DECLARE_C_ENUM(ChatMessageState, L_ENUM_VALUES_CHAT_MESSAGE_STATE); - -/** - * #LinphoneChatRoomCapabilities is used to indicate the capabilities of a chat room. - * @ingroup chatroom - */ -L_DECLARE_C_ENUM_FIXED_VALUES(ChatRoomCapabilities, L_ENUM_VALUES_CHAT_ROOM_CAPABILITIES); - -/** - * #LinphoneChatRoomBackend is used to indicate the backend implementation of a chat room. - * @ingroup chatroom - */ -L_DECLARE_C_ENUM_FIXED_VALUES(ChatRoomBackend, L_ENUM_VALUES_CHAT_ROOM_BACKEND); - -/** - * #LinphoneChatRoomEncryptionBackend is used to indicate the encryption engine used by a chat room. - * @ingroup chatroom - */ -L_DECLARE_C_ENUM_FIXED_VALUES(ChatRoomEncryptionBackend, L_ENUM_VALUES_CHAT_ROOM_ENCRYPTION_BACKEND); - -/** - * TODO move to encryption engine object when available - * #LinphoneChatRoomSecurityLevel is used to indicate the encryption security level of a chat room. - * @ingroup chatroom - */ -L_DECLARE_C_ENUM(ChatRoomSecurityLevel, L_ENUM_VALUES_ENCRYPTION_ENGINE_SECURITY_LEVEL); - -/** - * #LinphoneChatRoomState is used to indicate the current state of a chat room. - * @ingroup chatroom - */ -L_DECLARE_C_ENUM(ChatRoomState, L_ENUM_VALUES_CHAT_ROOM_STATE); - -// ----------------------------------------------------------------------------- -// EventLog. -// ----------------------------------------------------------------------------- - -/** - * #LinphoneEventLogType is used to indicate the type of an event. Useful for cast. - * @ingroup events - */ -L_DECLARE_C_ENUM(EventLogType, L_ENUM_VALUES_EVENT_LOG_TYPE); - -/** - * #LinphoneSecurityEventType is used to indicate the type of security event. - * @ingroup events - */ -L_DECLARE_C_ENUM(SecurityEventType, L_ENUM_VALUES_SECURITY_EVENT_TYPE); #ifdef __cplusplus } -- Gitblit v1.8.0