mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Some refactoring to have a more object-oriented API.
This commit is contained in:
parent
6696107ff3
commit
cd4870d5ad
46 changed files with 2368 additions and 2171 deletions
|
|
@ -17,6 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "linphone/call_params.h"
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1546,18 +1546,6 @@ unsigned int linphone_chat_message_get_storage_id(LinphoneChatMessage *msg) {
|
|||
}
|
||||
|
||||
LinphoneChatMessage *linphone_chat_message_clone(const LinphoneChatMessage *msg) {
|
||||
/*struct _LinphoneChatMessage {
|
||||
char* msg;
|
||||
LinphoneChatRoom* chat_room;
|
||||
LinphoneChatMessageStateChangeCb cb;
|
||||
void* cb_ud;
|
||||
void* message_userdata;
|
||||
char* external_body_url;
|
||||
LinphoneAddress* from;
|
||||
time_t time;
|
||||
SalCustomHeader *custom_headers;
|
||||
LinphoneChatMessageState state;
|
||||
};*/
|
||||
LinphoneChatMessage *new_message = linphone_chat_room_create_message(msg->chat_room, msg->message);
|
||||
if (msg->external_body_url)
|
||||
new_message->external_body_url = ms_strdup(msg->external_body_url);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "linphone/core.h"
|
||||
#include "private.h"
|
||||
#include "conference_private.h"
|
||||
#include <mediastreamer2/msvolume.h>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "linphone/factory.h"
|
||||
#include "private.h"
|
||||
|
||||
extern LinphoneCore *_linphone_core_new_with_config(LinphoneCoreCbs *cbs, struct _LpConfig *config, void *userdata);
|
||||
|
|
@ -84,3 +85,7 @@ LinphoneAddress *linphone_factory_create_address(const LinphoneFactory *factory,
|
|||
LinphoneAuthInfo *linphone_factory_create_auth_info(const LinphoneFactory *factory, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain) {
|
||||
return linphone_auth_info_new(username, userid, passwd, ha1, realm, domain);
|
||||
}
|
||||
|
||||
LinphoneVcard *linphone_factory_create_vcard(LinphoneFactory *factory) {
|
||||
return linphone_vcard_new();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "linphone/ringtoneplayer.h"
|
||||
#include "vcard_private.h"
|
||||
#include "carddav.h"
|
||||
#include "linphone/player.h"
|
||||
|
||||
#include "bctoolbox/port.h"
|
||||
#include "bctoolbox/map.h"
|
||||
|
|
@ -392,7 +393,6 @@ void linphone_call_set_symmetric_rtp(LinphoneCall *call, bool_t val);
|
|||
/* private: */
|
||||
LinphoneCallLog * linphone_call_log_new(LinphoneCallDir dir, LinphoneAddress *local, LinphoneAddress * remote);
|
||||
void linphone_call_log_completed(LinphoneCall *call);
|
||||
void linphone_call_log_destroy(LinphoneCallLog *cl);
|
||||
void linphone_call_set_transfer_state(LinphoneCall* call, LinphoneCallState state);
|
||||
LinphonePlayer *linphone_call_build_player(LinphoneCall*call);
|
||||
void linphone_call_refresh_sockets(LinphoneCall *call);
|
||||
|
|
@ -407,7 +407,8 @@ void linphone_call_params_set_custom_headers(LinphoneCallParams *params, const S
|
|||
void linphone_call_params_set_custom_sdp_attributes(LinphoneCallParams *params, const SalCustomSdpAttribute *csa);
|
||||
void linphone_call_params_set_custom_sdp_media_attributes(LinphoneCallParams *params, LinphoneStreamType type, const SalCustomSdpAttribute *csa);
|
||||
|
||||
void linphone_auth_info_write_config(struct _LpConfig *config, LinphoneAuthInfo *obj, int pos);
|
||||
void linphone_auth_info_write_config(LinphoneConfig *config, LinphoneAuthInfo *obj, int pos);
|
||||
LinphoneAuthInfo * linphone_auth_info_new_from_config_file(LpConfig *config, int pos);
|
||||
void linphone_core_write_auth_info(LinphoneCore *lc, LinphoneAuthInfo *ai);
|
||||
const LinphoneAuthInfo *_linphone_core_find_tls_auth_info(LinphoneCore *lc);
|
||||
const LinphoneAuthInfo *_linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username, const char *domain, bool_t ignore_realm);
|
||||
|
|
@ -542,7 +543,7 @@ bool_t linphone_core_media_description_contains_video_stream(const SalMediaDescr
|
|||
|
||||
void linphone_core_send_initial_subscribes(LinphoneCore *lc);
|
||||
void linphone_core_write_friends_config(LinphoneCore* lc);
|
||||
void linphone_friend_write_to_config_file(struct _LpConfig *config, LinphoneFriend *lf, int index);
|
||||
void linphone_friend_write_to_config_file(LinphoneConfig *config, LinphoneFriend *lf, int index);
|
||||
LinphoneFriend * linphone_friend_new_from_config_file(struct _LinphoneCore *lc, int index);
|
||||
|
||||
void linphone_proxy_config_update(LinphoneProxyConfig *cfg);
|
||||
|
|
@ -552,7 +553,7 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result);
|
|||
LINPHONE_PUBLIC void linphone_core_get_local_ip(LinphoneCore *lc, int af, const char *dest, char *result);
|
||||
|
||||
LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(LinphoneCore *lc, int index);
|
||||
void linphone_proxy_config_write_to_config_file(struct _LpConfig* config,LinphoneProxyConfig *obj, int index);
|
||||
void linphone_proxy_config_write_to_config_file(LinphoneConfig* config,LinphoneProxyConfig *obj, int index);
|
||||
|
||||
LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const SalMessage *msg);
|
||||
void linphone_core_real_time_text_received(LinphoneCore *lc, LinphoneChatRoom *cr, uint32_t character, LinphoneCall *call);
|
||||
|
|
@ -965,6 +966,10 @@ struct _LinphoneCoreCbs {
|
|||
|
||||
void _linphone_core_cbs_set_v_table(LinphoneCoreCbs *cbs, LinphoneCoreVTable *vtable, bool_t autorelease);
|
||||
|
||||
typedef struct _LCCallbackObj {
|
||||
LinphoneCoreCbFunc _func;
|
||||
void *_user_data;
|
||||
} LCCallbackObj;
|
||||
|
||||
struct _LinphoneCore
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "sal/sal.h"
|
||||
#include <bctoolbox/crypto.h>
|
||||
#include "private.h"
|
||||
#include "linphone/factory.h"
|
||||
#include "linphone/wrapper_utils.h"
|
||||
|
||||
#define VCARD_MD5_HASH_SIZE 16
|
||||
|
|
@ -98,10 +99,6 @@ LinphoneVcard *linphone_vcard_new(void) {
|
|||
return _linphone_vcard_new();
|
||||
}
|
||||
|
||||
LinphoneVcard *linphone_factory_create_vcard(LinphoneFactory *factory) {
|
||||
return _linphone_vcard_new();
|
||||
}
|
||||
|
||||
static LinphoneVcard* linphone_vcard_new_from_belcard(shared_ptr<belcard::BelCard> belcard) {
|
||||
LinphoneVcard* vCard = belle_sip_object_new(LinphoneVcard);
|
||||
vCard->belCard = belcard;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ set(HEADER_FILES
|
|||
content.h
|
||||
core.h
|
||||
core_utils.h
|
||||
defs.h
|
||||
dictionary.h
|
||||
error_info.h
|
||||
event.h
|
||||
|
|
@ -43,9 +44,13 @@ set(HEADER_FILES
|
|||
friendlist.h
|
||||
im_encryption_engine.h
|
||||
im_notif_policy.h
|
||||
info_message.h
|
||||
ldapprovider.h
|
||||
lpconfig.h
|
||||
misc.h
|
||||
nat_policy.h
|
||||
payload_type.h
|
||||
player.h
|
||||
presence.h
|
||||
proxy_config.h
|
||||
ringtoneplayer.h
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ linphone_include_HEADERS=\
|
|||
content.h \
|
||||
core.h \
|
||||
core_utils.h \
|
||||
defs.h \
|
||||
dictionary.h \
|
||||
error_info.h \
|
||||
event.h \
|
||||
|
|
@ -23,9 +24,13 @@ linphone_include_HEADERS=\
|
|||
friendlist.h \
|
||||
im_encryption_engine.h \
|
||||
im_notif_policy.h \
|
||||
info_message.h \
|
||||
ldapprovider.h \
|
||||
lpconfig.h \
|
||||
misc.h \
|
||||
nat_policy.h \
|
||||
payload_type.h \
|
||||
player.h \
|
||||
presence.h \
|
||||
proxy_config.h \
|
||||
ringtoneplayer.h \
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_ACCOUNT_CREATOR_H_
|
||||
#define LINPHONE_ACCOUNT_CREATOR_H_
|
||||
|
||||
#include "linphonecore.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -31,63 +31,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enum describing the status of a LinphoneAccountCreator operation.
|
||||
**/
|
||||
typedef enum _LinphoneAccountCreatorStatus {
|
||||
LinphoneAccountCreatorOK,
|
||||
LinphoneAccountCreatorReqFailed,
|
||||
|
||||
LinphoneAccountCreatorAccountCreated,
|
||||
LinphoneAccountCreatorAccountNotCreated,
|
||||
|
||||
LinphoneAccountCreatorAccountExist,
|
||||
LinphoneAccountCreatorAccountExistWithAlias,
|
||||
LinphoneAccountCreatorAccountNotExist,
|
||||
|
||||
LinphoneAccountCreatorAccountActivated,
|
||||
LinphoneAccountCreatorAccountAlreadyActivated,
|
||||
LinphoneAccountCreatorAccountNotActivated,
|
||||
|
||||
LinphoneAccountCreatorAccountLinked,
|
||||
LinphoneAccountCreatorAccountNotLinked,
|
||||
|
||||
LinphoneAccountCreatorEmailInvalid,
|
||||
|
||||
LinphoneAccountCreatorUsernameInvalid,
|
||||
LinphoneAccountCreatorUsernameTooShort,
|
||||
LinphoneAccountCreatorUsernameTooLong,
|
||||
LinphoneAccountCreatorUsernameInvalidSize,
|
||||
|
||||
LinphoneAccountCreatorPhoneNumberInvalid,
|
||||
LinphoneAccountCreatorPhoneNumberTooShort,
|
||||
LinphoneAccountCreatorPhoneNumberTooLong,
|
||||
LinphoneAccountCreatorPhoneNumberUsedAccount,
|
||||
LinphoneAccountCreatorPhoneNumberUsedAlias,
|
||||
LinphoneAccountCreatorPhoneNumberNotUsed,
|
||||
|
||||
LinphoneAccountCreatorPasswordTooShort,
|
||||
LinphoneAccountCreatorPasswordTooLong,
|
||||
|
||||
LinphoneAccountCreatorDomainInvalid,
|
||||
LinphoneAccountCreatorRouteInvalid,
|
||||
LinphoneAccountCreatorDisplayNameInvalid,
|
||||
LinphoneAccountCreatorTransportNotSupported,
|
||||
LinphoneAccountCreatorCountryCodeInvalid,
|
||||
|
||||
LinphoneAccountCreatorErrorServer,
|
||||
} LinphoneAccountCreatorStatus;
|
||||
|
||||
/**
|
||||
* The LinphoneAccountCreator object used to create an account on a server via XML-RPC.
|
||||
**/
|
||||
typedef struct _LinphoneAccountCreator LinphoneAccountCreator;
|
||||
|
||||
/**
|
||||
* An object to handle the callbacks for handling the LinphoneAccountCreator operations.
|
||||
**/
|
||||
typedef struct _LinphoneAccountCreatorCbs LinphoneAccountCreatorCbs;
|
||||
|
||||
/**
|
||||
* Callback to notify a status change of the account creator.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
|
|
@ -514,6 +457,7 @@ LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_g
|
|||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_is_phone_number_used(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_recover_phone_account(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_recover_phone_account(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_ADDRESS_H
|
||||
#define LINPHONE_ADDRESS_H
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -29,19 +31,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object that represents a 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>'.
|
||||
* 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.
|
||||
*/
|
||||
typedef struct SalAddress LinphoneAddress;
|
||||
|
||||
/**
|
||||
* Constructs a LinphoneAddress object by parsing the user supplied address,
|
||||
* given as a string.
|
||||
|
|
|
|||
|
|
@ -21,37 +21,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_AUTH_INFO_H
|
||||
|
||||
#include <mediastreamer2/mscommon.h>
|
||||
#include "linphone/types.h"
|
||||
|
||||
/**
|
||||
* @addtogroup authentication
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object holding authentication information.
|
||||
*
|
||||
* @note The object's fields should not be accessed directly. Prefer using
|
||||
* the accessor methods.
|
||||
*
|
||||
* In most case, authentication information consists of a username and password.
|
||||
* Sometimes, a userid is required by proxy, and realm can be useful to discriminate
|
||||
* different SIP domains.
|
||||
*
|
||||
* 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 auth_info_requested callback of the
|
||||
* LinphoneCoreVTable structure.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
**/
|
||||
typedef struct _LinphoneAuthInfo LinphoneAuthInfo;
|
||||
|
||||
/**
|
||||
* Safely cast a belle_sip_object_t into LinphoneAuthInfo
|
||||
*/
|
||||
|
|
@ -229,7 +205,6 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_tls_key_path(const LinphoneAu
|
|||
|
||||
/* you don't need those function*/
|
||||
LINPHONE_PUBLIC void linphone_auth_info_destroy(LinphoneAuthInfo *info);
|
||||
LINPHONE_PUBLIC LinphoneAuthInfo * linphone_auth_info_new_from_config_file(LpConfig *config, int pos);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_BUFFER_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -31,12 +34,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* The LinphoneContent object representing a data buffer.
|
||||
**/
|
||||
typedef struct _LinphoneBuffer LinphoneBuffer;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new empty LinphoneBuffer object.
|
||||
* @return A new LinphoneBuffer object.
|
||||
|
|
|
|||
|
|
@ -21,12 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_CALL_H
|
||||
|
||||
#include <mediastreamer2/mscommon.h>
|
||||
|
||||
#include "linphone/address.h"
|
||||
#include "linphone/call_log.h"
|
||||
#include "linphone/call_params.h"
|
||||
#include "linphone/conference.h"
|
||||
#include "linphone/error_info.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
/**
|
||||
|
|
@ -34,48 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* LinphoneCallState enum represents the different state a call can reach into.
|
||||
* The application is notified of state changes through the LinphoneCoreVTable::call_state_changed callback.
|
||||
**/
|
||||
typedef enum _LinphoneCallState{
|
||||
LinphoneCallIdle, /**<Initial call state */
|
||||
LinphoneCallIncomingReceived, /**<This is a new incoming call */
|
||||
LinphoneCallOutgoingInit, /**<An outgoing call is started */
|
||||
LinphoneCallOutgoingProgress, /**<An outgoing call is in progress */
|
||||
LinphoneCallOutgoingRinging, /**<An outgoing call is ringing at remote end */
|
||||
LinphoneCallOutgoingEarlyMedia, /**<An outgoing call is proposed early media */
|
||||
LinphoneCallConnected, /**<Connected, the call is answered */
|
||||
LinphoneCallStreamsRunning, /**<The media streams are established and running*/
|
||||
LinphoneCallPausing, /**<The call is pausing at the initiative of local end */
|
||||
LinphoneCallPaused, /**< The call is paused, remote end has accepted the pause */
|
||||
LinphoneCallResuming, /**<The call is being resumed by local end*/
|
||||
LinphoneCallRefered, /**<The call is being transfered to another party, resulting in a new outgoing call to follow immediately*/
|
||||
LinphoneCallError, /**<The call encountered an error*/
|
||||
LinphoneCallEnd, /**<The call ended normally*/
|
||||
LinphoneCallPausedByRemote, /**<The call is paused by remote end*/
|
||||
LinphoneCallUpdatedByRemote, /**<The call's parameters change is requested by remote end, used for example when video is added by remote */
|
||||
LinphoneCallIncomingEarlyMedia, /**<We are proposing early media to an incoming call */
|
||||
LinphoneCallUpdating, /**<A call update has been initiated by us */
|
||||
LinphoneCallReleased, /**< The call object is no more retained by the core */
|
||||
LinphoneCallEarlyUpdatedByRemote, /*<The call is updated by remote while not yet answered (early dialog SIP UPDATE received).*/
|
||||
LinphoneCallEarlyUpdating /*<We are updating the call while not yet answered (early dialog SIP UPDATE sent)*/
|
||||
} LinphoneCallState;
|
||||
|
||||
/**
|
||||
* Enum describing type of audio route.
|
||||
**/
|
||||
enum _LinphoneAudioRoute {
|
||||
LinphoneAudioRouteEarpiece = MSAudioRouteEarpiece,
|
||||
LinphoneAudioRouteSpeaker = MSAudioRouteSpeaker
|
||||
};
|
||||
|
||||
/**
|
||||
* Enum describing type of audio route.
|
||||
**/
|
||||
typedef enum _LinphoneAudioRoute LinphoneAudioRoute;
|
||||
|
||||
|
||||
/** Callback prototype */
|
||||
typedef void (*LinphoneCallCbFunc)(LinphoneCall *call, void *user_data);
|
||||
|
||||
|
|
@ -84,8 +36,6 @@ typedef void (*LinphoneCallCbFunc)(LinphoneCall *call, void *user_data);
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_call_state_to_string(LinphoneCallState cs);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the call.
|
||||
* An application that wishes to retain a pointer to call object
|
||||
|
|
@ -573,6 +523,27 @@ LINPHONE_PUBLIC void linphone_call_ogl_render(LinphoneCall *call, bool_t is_prev
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* Send a LinphoneInfoMessage through an established call
|
||||
* @param call the call
|
||||
* @param info the info message
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_call_send_info_message(LinphoneCall *call, const LinphoneInfoMessage *info);
|
||||
|
||||
/**
|
||||
* Return call statistics for a particular stream type.
|
||||
* @param call the call
|
||||
* @param type the stream type
|
||||
**/
|
||||
LINPHONE_PUBLIC const LinphoneCallStats *linphone_call_get_stats(LinphoneCall *call, LinphoneStreamType type);
|
||||
|
||||
LINPHONE_PUBLIC const LinphoneCallStats *linphone_call_get_audio_stats(LinphoneCall *call);
|
||||
|
||||
LINPHONE_PUBLIC const LinphoneCallStats *linphone_call_get_video_stats(LinphoneCall *call);
|
||||
|
||||
LINPHONE_PUBLIC const LinphoneCallStats *linphone_call_get_text_stats(LinphoneCall *call);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,45 +21,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef __LINPHONE_CALL_LOG_H__
|
||||
#define __LINPHONE_CALL_LOG_H__
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup call_logs
|
||||
* @{
|
||||
**/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Structures and enums *
|
||||
******************************************************************************/
|
||||
|
||||
/**
|
||||
* Enum representing the direction of a call.
|
||||
**/
|
||||
enum _LinphoneCallDir {
|
||||
LinphoneCallOutgoing, /**< outgoing calls*/
|
||||
LinphoneCallIncoming /**< incoming calls*/
|
||||
};
|
||||
|
||||
/**
|
||||
* Typedef for enum
|
||||
**/
|
||||
typedef enum _LinphoneCallDir LinphoneCallDir;
|
||||
|
||||
/**
|
||||
* Enum representing the status of a call
|
||||
**/
|
||||
typedef enum _LinphoneCallStatus {
|
||||
LinphoneCallSuccess, /**< The call was sucessful */
|
||||
LinphoneCallAborted, /**< The call was aborted */
|
||||
LinphoneCallMissed, /**< The call was missed (unanswered) */
|
||||
LinphoneCallDeclined /**< The call was declined, either locally or by remote end */
|
||||
} LinphoneCallStatus;
|
||||
|
||||
/**
|
||||
* Structure representing a call log.
|
||||
**/
|
||||
typedef struct _LinphoneCallLog LinphoneCallLog;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Public functions *
|
||||
******************************************************************************/
|
||||
|
|
@ -242,10 +214,12 @@ LINPHONE_PUBLIC void linphone_call_log_unref(LinphoneCallLog *cl);
|
|||
*/
|
||||
LINPHONE_PUBLIC void linphone_call_log_destroy(LinphoneCallLog *cl);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
**/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LINPHONE_CALL_LOG_H__ */
|
||||
|
|
|
|||
|
|
@ -21,43 +21,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef __LINPHONE_CALL_PARAMS_H__
|
||||
#define __LINPHONE_CALL_PARAMS_H__
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup call_control
|
||||
* @{
|
||||
**/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Structures and enums *
|
||||
******************************************************************************/
|
||||
/**
|
||||
* Indicates for a given media the stream direction
|
||||
* */
|
||||
enum _LinphoneMediaDirection {
|
||||
LinphoneMediaDirectionInvalid = -1,
|
||||
LinphoneMediaDirectionInactive, /** No active media not supported yet*/
|
||||
LinphoneMediaDirectionSendOnly, /** Send only mode*/
|
||||
LinphoneMediaDirectionRecvOnly, /** recv only mode*/
|
||||
LinphoneMediaDirectionSendRecv, /** send receive*/
|
||||
};
|
||||
/**
|
||||
* Typedef for enum
|
||||
**/
|
||||
typedef enum _LinphoneMediaDirection LinphoneMediaDirection;
|
||||
|
||||
/**
|
||||
* Private structure definition for LinphoneCallParams.
|
||||
**/
|
||||
struct _LinphoneCallParams;
|
||||
|
||||
/**
|
||||
* The LinphoneCallParams is an object containing various call related parameters.
|
||||
* It can be used to retrieve parameters from a currently running call or modify
|
||||
* the call's characteristics dynamically.
|
||||
**/
|
||||
typedef struct _LinphoneCallParams LinphoneCallParams;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Public functions *
|
||||
******************************************************************************/
|
||||
|
|
@ -468,10 +444,12 @@ LINPHONE_PUBLIC void linphone_call_params_clear_custom_sdp_media_attributes(Linp
|
|||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_call_params_destroy(LinphoneCallParams *cp);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
**/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LINPHONE_CALL_PARAMS_H__ */
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_CALL_STATS_H
|
||||
#define LINPHONE_CALL_STATS_H
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -29,20 +31,14 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define LINPHONE_CALL_STATS_AUDIO ((int)LinphoneStreamTypeAudio)
|
||||
#define LINPHONE_CALL_STATS_VIDEO ((int)LinphoneStreamTypeVideo)
|
||||
#define LINPHONE_CALL_STATS_TEXT ((int)LinphoneStreamTypeText)
|
||||
|
||||
#define LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE (1 << 0) /**< received_rtcp field of LinphoneCallStats object has been updated */
|
||||
#define LINPHONE_CALL_STATS_SENT_RTCP_UPDATE (1 << 1) /**< sent_rtcp field of LinphoneCallStats object has been updated */
|
||||
#define LINPHONE_CALL_STATS_PERIODICAL_UPDATE (1 << 2) /**< Every seconds LinphoneCallStats object has been updated */
|
||||
|
||||
/**
|
||||
* The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams.
|
||||
*
|
||||
* To receive these informations periodically and as soon as they are computed, the application is invited to place a #LinphoneCoreCallStatsUpdatedCb callback in the LinphoneCoreVTable structure
|
||||
* it passes for instanciating the LinphoneCore object (see linphone_core_new() ).
|
||||
*
|
||||
* At any time, the application can access last computed statistics using linphone_call_get_audio_stats() or linphone_call_get_video_stats().
|
||||
**/
|
||||
typedef struct _LinphoneCallStats LinphoneCallStats;
|
||||
|
||||
/**
|
||||
* The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -33,26 +33,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* LinphoneChatMessageState is used to notify if messages have been succesfully delivered or not.
|
||||
*/
|
||||
typedef enum _LinphoneChatMessageState {
|
||||
LinphoneChatMessageStateIdle, /**< Initial state */
|
||||
LinphoneChatMessageStateInProgress, /**< Delivery in progress */
|
||||
LinphoneChatMessageStateDelivered, /**< Message successfully delivered and acknowledged by server */
|
||||
LinphoneChatMessageStateNotDelivered, /**< Message was not delivered */
|
||||
LinphoneChatMessageStateFileTransferError, /**< Message was received(and acknowledged) but cannot get file from server */
|
||||
LinphoneChatMessageStateFileTransferDone, /**< File transfer has been completed successfully. */
|
||||
LinphoneChatMessageStateDeliveredToUser, /**< Message successfully delivered and acknowledged to destination */
|
||||
LinphoneChatMessageStateDisplayed /**< Message displayed to the remote user */
|
||||
} LinphoneChatMessageState;
|
||||
|
||||
typedef enum _LinphoneLimeState {
|
||||
LinphoneLimeDisabled, /**< Lime is not used at all */
|
||||
LinphoneLimeMandatory, /**< Lime is always used */
|
||||
LinphoneLimePreferred, /**< Lime is used only if we already shared a secret with remote */
|
||||
} LinphoneLimeState;
|
||||
|
||||
/**
|
||||
* Call back used to notify message delivery status
|
||||
* @param msg #LinphoneChatMessage object
|
||||
|
|
@ -96,61 +76,6 @@ typedef LinphoneBuffer * (*LinphoneChatMessageCbsFileTransferSendCb)(LinphoneCha
|
|||
*/
|
||||
typedef void (*LinphoneChatMessageCbsFileTransferProgressIndicationCb)(LinphoneChatMessage *message, const LinphoneContent* content, size_t offset, size_t total);
|
||||
|
||||
/**
|
||||
* Set the chat database path.
|
||||
* @param lc the linphone core
|
||||
* @param path the database path
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_set_chat_database_path(LinphoneCore *lc, const char *path);
|
||||
|
||||
/**
|
||||
* Get path to the database file used for storing chat messages.
|
||||
* @param lc the linphone core
|
||||
* @return file path or NULL if not exist
|
||||
**/
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_core_get_chat_database_path(const LinphoneCore *lc);
|
||||
/**
|
||||
* Get a chat room whose peer is the supplied address. If it does not exist yet, it will be created.
|
||||
* No reference is transfered to the application. The LinphoneCore keeps a reference on the chat room.
|
||||
* @param lc the linphone core
|
||||
* @param addr a linphone address.
|
||||
* @return #LinphoneChatRoom where messaging can take place.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const LinphoneAddress *addr);
|
||||
/**
|
||||
* Get a chat room for messaging from a sip uri like sip:joe@sip.linphone.org. If it does not exist yet, it will be created.
|
||||
* No reference is transfered to the application. The LinphoneCore keeps a reference on the chat room.
|
||||
* @param lc A #LinphoneCore object
|
||||
* @param to The destination address for messages.
|
||||
* @return #LinphoneChatRoom where messaging can take place.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneChatRoom *linphone_core_get_chat_room_from_uri(LinphoneCore *lc, const char *to);
|
||||
|
||||
/**
|
||||
* Removes a chatroom including all message history from the LinphoneCore.
|
||||
* @param lc A #LinphoneCore object
|
||||
* @param cr A #LinphoneChatRoom object
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_delete_chat_room(LinphoneCore *lc, LinphoneChatRoom *cr);
|
||||
|
||||
/**
|
||||
* Inconditionnaly disable incoming chat messages.
|
||||
* @param lc A #LinphoneCore object
|
||||
* @param deny_reason the deny reason (#LinphoneReasonNone has no effect).
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_disable_chat(LinphoneCore *lc, LinphoneReason deny_reason);
|
||||
/**
|
||||
* Enable reception of incoming chat messages.
|
||||
* By default it is enabled but it can be disabled with linphone_core_disable_chat().
|
||||
* @param lc A #LinphoneCore object
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_enable_chat(LinphoneCore *lc);
|
||||
/**
|
||||
* Returns whether chat is enabled.
|
||||
* @param lc A #LinphoneCore object
|
||||
**/
|
||||
LINPHONE_PUBLIC bool_t linphone_core_chat_enabled(const LinphoneCore *lc);
|
||||
/**
|
||||
* Destroy a LinphoneChatRoom.
|
||||
* @param cr #LinphoneChatRoom object
|
||||
|
|
@ -163,7 +88,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_destroy(LinphoneChat
|
|||
* @param message text message, NULL if absent.
|
||||
* @return a new #LinphoneChatMessage
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message(LinphoneChatRoom *cr,const char* message);
|
||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message(LinphoneChatRoom *cr,const char* message);
|
||||
/**
|
||||
* Create a message attached to a dedicated chat room;
|
||||
* @param cr the chat room.
|
||||
|
|
@ -175,7 +100,7 @@ LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message(LinphoneC
|
|||
* @param is_incoming TRUE if the message has been received, FALSE otherwise.
|
||||
* @return a new #LinphoneChatMessage
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message_2(LinphoneChatRoom *cr, const char* message, const char* external_body_url, LinphoneChatMessageState state, time_t time, bool_t is_read, bool_t is_incoming);
|
||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message_2(LinphoneChatRoom *cr, const char* message, const char* external_body_url, LinphoneChatMessageState state, time_t time, bool_t is_read, bool_t is_incoming);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the chat room.
|
||||
|
|
@ -211,14 +136,14 @@ LINPHONE_PUBLIC void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void
|
|||
* @param initial_content #LinphoneContent initial content. #LinphoneCoreVTable.file_transfer_send is invoked later to notify file transfer progress and collect next chunk of the message if LinphoneContent.data is NULL.
|
||||
* @return a new #LinphoneChatMessage
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_file_transfer_message(LinphoneChatRoom *cr, const LinphoneContent* initial_content);
|
||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_file_transfer_message(LinphoneChatRoom *cr, const LinphoneContent* initial_content);
|
||||
|
||||
/**
|
||||
* get peer address \link linphone_core_get_chat_room() associated to \endlink this #LinphoneChatRoom
|
||||
* @param cr #LinphoneChatRoom object
|
||||
* @return #LinphoneAddress peer address
|
||||
*/
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom *cr);
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom *cr);
|
||||
|
||||
/**
|
||||
* Send a message to peer member of this chat room.
|
||||
|
|
@ -226,7 +151,8 @@ LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(Linph
|
|||
* @param cr #LinphoneChatRoom object
|
||||
* @param msg message to be sent
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
|
||||
|
||||
/**
|
||||
* Send a message to peer member of this chat room.
|
||||
* @param cr #LinphoneChatRoom object
|
||||
|
|
@ -237,7 +163,8 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(Linphon
|
|||
* @note The LinphoneChatMessage must not be destroyed until the the callback is called.
|
||||
* The LinphoneChatMessage reference is transfered to the function and thus doesn't need to be unref'd by the application.
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangedCb status_cb,void* ud);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangedCb status_cb,void* ud);
|
||||
|
||||
/**
|
||||
* Send a message to peer member of this chat room.
|
||||
* @param[in] cr LinphoneChatRoom object
|
||||
|
|
@ -253,6 +180,7 @@ LINPHONE_PUBLIC void linphone_chat_room_send_chat_message(LinphoneChatRoom *cr,
|
|||
* @param[in] cr The #LinphoneChatRoom object corresponding to the conversation.
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr);
|
||||
|
||||
/**
|
||||
* Delete a message from the chat room history.
|
||||
* @param[in] cr The #LinphoneChatRoom object corresponding to the conversation.
|
||||
|
|
@ -260,11 +188,13 @@ LINPHONE_PUBLIC void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr);
|
|||
*/
|
||||
|
||||
LINPHONE_PUBLIC void linphone_chat_room_delete_message(LinphoneChatRoom *cr, LinphoneChatMessage *msg);
|
||||
|
||||
/**
|
||||
* Delete all messages from the history
|
||||
* @param[in] cr The #LinphoneChatRoom object corresponding to the conversation.
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_room_delete_history(LinphoneChatRoom *cr);
|
||||
|
||||
/**
|
||||
* Gets the number of messages in a chat room.
|
||||
* @param[in] cr The #LinphoneChatRoom object corresponding to the conversation for which size has to be computed
|
||||
|
|
@ -344,20 +274,14 @@ LINPHONE_PUBLIC bool_t linphone_chat_room_lime_available(LinphoneChatRoom *cr);
|
|||
**/
|
||||
LINPHONE_PUBLIC const bctbx_list_t* linphone_core_get_chat_rooms(LinphoneCore *lc);
|
||||
|
||||
|
||||
LINPHONE_PUBLIC unsigned int linphone_chat_message_store(LinphoneChatMessage *msg);
|
||||
|
||||
/**
|
||||
* Returns a #LinphoneChatMessageState as a string.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_state_to_string(const LinphoneChatMessageState state);
|
||||
|
||||
/**
|
||||
* Get the state of the message
|
||||
*@param message #LinphoneChatMessage obj
|
||||
*@return #LinphoneChatMessageState
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneChatMessageState linphone_chat_message_get_state(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC LinphoneChatMessageState linphone_chat_message_get_state(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* Duplicate a LinphoneChatMessage
|
||||
|
|
@ -400,7 +324,7 @@ LINPHONE_PUBLIC void linphone_chat_message_set_from_address(LinphoneChatMessage*
|
|||
* @param[in] message #LinphoneChatMessage obj
|
||||
* @return #LinphoneAddress
|
||||
*/
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_from_address(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_from_address(const LinphoneChatMessage* message);
|
||||
|
||||
#define linphone_chat_message_set_to(msg, addr) linphone_chat_message_set_to_address(msg, addr)
|
||||
|
||||
|
|
@ -419,7 +343,7 @@ LINPHONE_PUBLIC void linphone_chat_message_set_to_address(LinphoneChatMessage* m
|
|||
* @param[in] message #LinphoneChatMessage obj
|
||||
* @return #LinphoneAddress
|
||||
*/
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_to_address(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_to_address(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* Get if the message was encrypted when transfered
|
||||
|
|
@ -433,7 +357,7 @@ LINPHONE_PUBLIC bool_t linphone_chat_message_is_secured(LinphoneChatMessage *msg
|
|||
* @param message #LinphoneChatMessage
|
||||
* @return external body url or NULL if not present.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_external_body_url(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_external_body_url(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* Linphone message can carry external body as defined by rfc2017
|
||||
|
|
@ -441,7 +365,7 @@ LINPHONE_PUBLIC const char* linphone_chat_message_get_external_body_url(const Li
|
|||
* @param message a LinphoneChatMessage
|
||||
* @param url ex: access-type=URL; URL="http://www.foo.com/file"
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_message_set_external_body_url(LinphoneChatMessage* message,const char* url);
|
||||
LINPHONE_PUBLIC void linphone_chat_message_set_external_body_url(LinphoneChatMessage* message,const char* url);
|
||||
|
||||
/**
|
||||
* Get the file_transfer_information (used by call backs to recover informations during a rcs file transfer)
|
||||
|
|
@ -449,7 +373,7 @@ LINPHONE_PUBLIC void linphone_chat_message_set_external_body_url(LinphoneChatMes
|
|||
* @param message #LinphoneChatMessage
|
||||
* @return a pointer to the LinphoneContent structure or NULL if not present.
|
||||
*/
|
||||
LINPHONE_PUBLIC const LinphoneContent* linphone_chat_message_get_file_transfer_information(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC const LinphoneContent* linphone_chat_message_get_file_transfer_information(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* Get the content type of a chat message.
|
||||
|
|
@ -494,7 +418,7 @@ LINPHONE_PUBLIC void linphone_chat_message_cancel_file_transfer(LinphoneChatMess
|
|||
* @param message #LinphoneChatMessage
|
||||
* @return the application-specific data or NULL if none has been stored.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_appdata(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_appdata(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* Linphone message has an app-specific field that can store a text. The application might want
|
||||
|
|
@ -506,42 +430,42 @@ LINPHONE_PUBLIC const char* linphone_chat_message_get_appdata(const LinphoneChat
|
|||
* @param message #LinphoneChatMessage
|
||||
* @param data the data to store into the message
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_message_set_appdata(LinphoneChatMessage* message, const char* data);
|
||||
LINPHONE_PUBLIC void linphone_chat_message_set_appdata(LinphoneChatMessage* message, const char* data);
|
||||
|
||||
/**
|
||||
* Get text part of this message
|
||||
* @return text or NULL if no text.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_text(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_text(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* Get the time the message was sent.
|
||||
*/
|
||||
LINPHONE_PUBLIC time_t linphone_chat_message_get_time(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC time_t linphone_chat_message_get_time(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* User pointer get function
|
||||
*/
|
||||
LINPHONE_PUBLIC void* linphone_chat_message_get_user_data(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC void* linphone_chat_message_get_user_data(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
*User pointer set function
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_message_set_user_data(LinphoneChatMessage* message,void*);
|
||||
LINPHONE_PUBLIC void linphone_chat_message_set_user_data(LinphoneChatMessage* message,void*);
|
||||
|
||||
/**
|
||||
* Returns the chatroom this message belongs to.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneChatRoom* linphone_chat_message_get_chat_room(LinphoneChatMessage *msg);
|
||||
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg);
|
||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg);
|
||||
|
||||
/**
|
||||
* Returns the origin address of a message if it was a outgoing message, or the destination address if it was an incoming message.
|
||||
*@param message #LinphoneChatMessage obj
|
||||
*@return #LinphoneAddress
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneAddress *linphone_chat_message_get_local_address(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC LinphoneAddress *linphone_chat_message_get_local_address(const LinphoneChatMessage* message);
|
||||
|
||||
/**
|
||||
* Add custom headers to the message.
|
||||
|
|
@ -549,21 +473,21 @@ LINPHONE_PUBLIC LinphoneAddress *linphone_chat_message_get_local_address(const L
|
|||
* @param header_name name of the header
|
||||
* @param header_value header value
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_chat_message_add_custom_header(LinphoneChatMessage* message, const char *header_name, const char *header_value);
|
||||
LINPHONE_PUBLIC void linphone_chat_message_add_custom_header(LinphoneChatMessage* message, const char *header_name, const char *header_value);
|
||||
|
||||
/**
|
||||
* Retrieve a custom header value given its name.
|
||||
* @param message the message
|
||||
* @param header_name header name searched
|
||||
**/
|
||||
LINPHONE_PUBLIC const char * linphone_chat_message_get_custom_header(LinphoneChatMessage* message, const char *header_name);
|
||||
LINPHONE_PUBLIC const char * linphone_chat_message_get_custom_header(LinphoneChatMessage* message, const char *header_name);
|
||||
|
||||
/**
|
||||
* Removes a custom header from the message.
|
||||
* @param msg the message
|
||||
* @param header_name name of the header to remove
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_chat_message_remove_custom_header(LinphoneChatMessage *msg, const char *header_name);
|
||||
LINPHONE_PUBLIC void linphone_chat_message_remove_custom_header(LinphoneChatMessage *msg, const char *header_name);
|
||||
|
||||
/**
|
||||
* Returns TRUE if the message has been read, otherwise returns FALSE.
|
||||
|
|
@ -622,7 +546,7 @@ LINPHONE_PUBLIC int linphone_chat_message_put_char(LinphoneChatMessage *msg,uint
|
|||
* @param[in] cm LinphoneChatMessage object
|
||||
* @return The message identifier.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_message_id(const LinphoneChatMessage *cm);
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_message_id(const LinphoneChatMessage *cm);
|
||||
|
||||
/**
|
||||
* get Curent Call associated to this chatroom if any
|
||||
|
|
@ -632,7 +556,6 @@ LINPHONE_PUBLIC const char* linphone_chat_message_get_message_id(const LinphoneC
|
|||
*/
|
||||
LINPHONE_PUBLIC LinphoneCall *linphone_chat_room_get_call(const LinphoneChatRoom *room);
|
||||
|
||||
|
||||
/**
|
||||
* Get the LinphoneChatMessageCbs object associated with the LinphoneChatMessage.
|
||||
* @param[in] msg LinphoneChatMessage object
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef CONFERENCE_H
|
||||
#define CONFERENCE_H
|
||||
#ifndef LINPHONE_CONFERENCE_H
|
||||
#define LINPHONE_CONFERENCE_H
|
||||
|
||||
#include "linphonecore.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -37,21 +37,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* LinphoneConference class
|
||||
* The _LinphoneConference struct does not exists, it's the Conference C++ class that is used behind
|
||||
*/
|
||||
typedef struct _LinphoneConference LinphoneConference;
|
||||
|
||||
/**
|
||||
* Parameters for initialization of conferences
|
||||
* The _LinphoneConferenceParams struct does not exists, it's the ConferenceParams C++ class that is used behind
|
||||
*/
|
||||
typedef struct _LinphoneConferenceParams LinphoneConferenceParams;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create a #LinphoneConferenceParams with default parameters set.
|
||||
* @param core #LinphoneCore to use to find out the default parameters. Can be NULL.
|
||||
|
|
@ -86,9 +71,6 @@ LINPHONE_PUBLIC void linphone_conference_params_enable_video(LinphoneConferenceP
|
|||
LINPHONE_PUBLIC bool_t linphone_conference_params_video_requested(const LinphoneConferenceParams *params);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Remove a participant from a conference
|
||||
* @param obj A #LinphoneConference
|
||||
|
|
@ -115,4 +97,4 @@ LINPHONE_PUBLIC bctbx_list_t *linphone_conference_get_participants(const Linphon
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // CONFERENCE_H
|
||||
#endif // LINPHONE_CONFERENCE_H
|
||||
|
|
|
|||
|
|
@ -14,30 +14,43 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_CONTACTPROVIDER_H_
|
||||
#define LINPHONE_CONTACTPROVIDER_H_
|
||||
|
||||
|
||||
#include "linphone/core.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* LinphoneContactSearchRequest */
|
||||
|
||||
void linphone_contact_search_init(LinphoneContactSearch* obj, const char* predicate, ContactSearchCallback cb, void* cb_data);
|
||||
ContactSearchID linphone_contact_search_get_id(LinphoneContactSearch* obj);
|
||||
const char* linphone_contact_search_get_predicate(LinphoneContactSearch* obj);
|
||||
void linphone_contact_search_invoke_cb(LinphoneContactSearch* req, MSList* friends);
|
||||
LINPHONE_PUBLIC LinphoneContactSearch* linphone_contact_search_ref(void* obj);
|
||||
void linphone_contact_search_unref(void* obj);
|
||||
LinphoneContactSearch* linphone_contact_search_cast( void*obj );
|
||||
void linphone_contact_search_init(LinphoneContactSearch *obj, const char *predicate, ContactSearchCallback cb, void *cb_data);
|
||||
ContactSearchID linphone_contact_search_get_id(LinphoneContactSearch *obj);
|
||||
const char* linphone_contact_search_get_predicate(LinphoneContactSearch *obj);
|
||||
void linphone_contact_search_invoke_cb(LinphoneContactSearch *req, MSList *friends);
|
||||
LINPHONE_PUBLIC LinphoneContactSearch* linphone_contact_search_ref(void *obj);
|
||||
void linphone_contact_search_unref(void *obj);
|
||||
LinphoneContactSearch* linphone_contact_search_cast(void *obj);
|
||||
|
||||
|
||||
/* LinphoneContactProvider */
|
||||
|
||||
void linphone_contact_provider_init(LinphoneContactProvider* obj, LinphoneCore* lc);
|
||||
LinphoneCore* linphone_contact_provider_get_core(LinphoneContactProvider* obj);
|
||||
const char* linphone_contact_provider_get_name(LinphoneContactProvider* obj);
|
||||
LinphoneContactProvider* linphone_contact_provider_ref(void* obj);
|
||||
LINPHONE_PUBLIC void linphone_contact_provider_unref(void* obj);
|
||||
LINPHONE_PUBLIC LinphoneContactProvider* linphone_contact_provider_cast( void*obj );
|
||||
void linphone_contact_provider_init(LinphoneContactProvider *obj, LinphoneCore *lc);
|
||||
LinphoneCore * linphone_contact_provider_get_core(LinphoneContactProvider *obj);
|
||||
const char * linphone_contact_provider_get_name(LinphoneContactProvider *obj);
|
||||
LinphoneContactProvider* linphone_contact_provider_ref(void *obj);
|
||||
LINPHONE_PUBLIC void linphone_contact_provider_unref(void *obj);
|
||||
LINPHONE_PUBLIC LinphoneContactProvider * linphone_contact_provider_cast(void *obj);
|
||||
|
||||
LINPHONE_PUBLIC LinphoneContactSearch* linphone_contact_provider_begin_search(LinphoneContactProvider* obj,
|
||||
const char* predicate,
|
||||
ContactSearchCallback cb,
|
||||
void* data);
|
||||
unsigned int linphone_contact_provider_cancel_search(LinphoneContactProvider* obj,
|
||||
LinphoneContactSearch* request);
|
||||
LINPHONE_PUBLIC LinphoneContactSearch * linphone_contact_provider_begin_search(LinphoneContactProvider *obj, const char *predicate, ContactSearchCallback cb, void *data);
|
||||
unsigned int linphone_contact_provider_cancel_search(LinphoneContactProvider *obj, LinphoneContactSearch *request);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* LINPHONE_CONTACTPROVIDER_H_ */
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_CONTENT_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -31,23 +34,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* The LinphoneContent object holds data that can be embedded in a signaling message.
|
||||
**/
|
||||
struct _LinphoneContent;
|
||||
/**
|
||||
* The LinphoneContent object holds data that can be embedded in a signaling message.
|
||||
**/
|
||||
typedef struct _LinphoneContent LinphoneContent;
|
||||
|
||||
|
||||
/**
|
||||
* Create a content with default values from Linphone core.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @return LinphoneContent object with default values set
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneContent * linphone_core_create_content(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the content.
|
||||
* @param[in] content LinphoneContent object.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -17,17 +17,17 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONECORE_UTILS_H
|
||||
#define LINPHONECORE_UTILS_H
|
||||
#ifndef LINPHONE_CORE_UTILS_H_
|
||||
#define LINPHONE_CORE_UTILS_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#include "linphone/core.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _LsdPlayer LsdPlayer;
|
||||
typedef struct _LinphoneSoundDaemon LinphoneSoundDaemon;
|
||||
|
||||
typedef void (*LsdEndOfPlayCallback)(LsdPlayer *p);
|
||||
|
||||
LINPHONE_PUBLIC void lsd_player_set_callback(LsdPlayer *p, LsdEndOfPlayCallback cb);
|
||||
|
|
@ -48,16 +48,6 @@ LINPHONE_PUBLIC void linphone_sound_daemon_release_all_players(LinphoneSoundDaem
|
|||
LINPHONE_PUBLIC void linphone_core_use_sound_daemon(LinphoneCore *lc, LinphoneSoundDaemon *lsd);
|
||||
LINPHONE_PUBLIC void linphone_sound_daemon_destroy(LinphoneSoundDaemon *obj);
|
||||
|
||||
/**
|
||||
* Enum describing the result of the echo canceller calibration process.
|
||||
**/
|
||||
typedef enum {
|
||||
LinphoneEcCalibratorInProgress, /**< The echo canceller calibration process is on going. */
|
||||
LinphoneEcCalibratorDone, /**< The echo canceller calibration has been performed and produced an echo delay measure. */
|
||||
LinphoneEcCalibratorFailed, /**< The echo canceller calibration process has failed. */
|
||||
LinphoneEcCalibratorDoneNoEcho /**< The echo canceller calibration has been performed and no echo has been detected. */
|
||||
}LinphoneEcCalibratorStatus;
|
||||
|
||||
|
||||
typedef void (*LinphoneEcCalibrationCallback)(LinphoneCore *lc, LinphoneEcCalibratorStatus status, int delay_ms, void *data);
|
||||
typedef void (*LinphoneEcCalibrationAudioInit)(void *data);
|
||||
|
|
@ -112,6 +102,7 @@ typedef struct _LinphoneDialPlan {
|
|||
*@return call country code or -1 if not found
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_dial_plan_lookup_ccc_from_iso(const char* iso);
|
||||
|
||||
/**
|
||||
* @ingroup misc
|
||||
*Function to get call country code from an e164 number, ex: +33952650121 will return 33
|
||||
|
|
@ -135,8 +126,7 @@ LINPHONE_PUBLIC const LinphoneDialPlan* linphone_dial_plan_by_ccc(const char *cc
|
|||
* @return Return matching dial plan, or a generic one if none found
|
||||
**/
|
||||
LINPHONE_PUBLIC const LinphoneDialPlan* linphone_dial_plan_by_ccc_as_int(int ccc);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return if given plan is generic
|
||||
**/
|
||||
|
|
@ -145,5 +135,5 @@ LINPHONE_PUBLIC bool_t linphone_dial_plan_is_generic(const LinphoneDialPlan *ccc
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONE_CORE_UTILS_H_ */
|
||||
|
|
|
|||
48
include/linphone/defs.h
Normal file
48
include/linphone/defs.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
defs.h
|
||||
Copyright (C) 2010-2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_DEFS_H_
|
||||
#define LINPHONE_DEFS_H_
|
||||
|
||||
|
||||
#include "mediastreamer2/mscommon.h"
|
||||
|
||||
|
||||
#define LINPHONE_IPADDR_SIZE 64
|
||||
#define LINPHONE_HOSTNAME_SIZE 128
|
||||
|
||||
#ifndef LINPHONE_PUBLIC
|
||||
#if defined(_MSC_VER)
|
||||
#ifdef LINPHONE_EXPORTS
|
||||
#define LINPHONE_PUBLIC __declspec(dllexport)
|
||||
#else
|
||||
#define LINPHONE_PUBLIC __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define LINPHONE_PUBLIC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LINPHONE_DEPRECATED
|
||||
#define LINPHONE_DEPRECATED MS2_DEPRECATED
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* LINPHONE_DEFS_H_ */
|
||||
|
|
@ -20,9 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_DICTIONARY_H
|
||||
#define LINPHONE_DICTIONARY_H
|
||||
|
||||
#include <mediastreamer2/mscommon.h>
|
||||
|
||||
typedef struct belle_sip_dict LinphoneDictionary;
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -20,85 +20,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_ERROR_INFO_H
|
||||
#define LINPHONE_ERROR_INFO_H
|
||||
|
||||
#include <mediastreamer2/mscommon.h>
|
||||
|
||||
/**
|
||||
* @addtogroup misc
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enum describing various failure reasons or contextual information for some events.
|
||||
* @see linphone_call_get_reason()
|
||||
* @see linphone_proxy_config_get_error()
|
||||
* @see linphone_error_info_get_reason()
|
||||
**/
|
||||
enum _LinphoneReason{
|
||||
LinphoneReasonNone, /**< No reason has been set by the core */
|
||||
LinphoneReasonNoResponse, /**< No response received from remote */
|
||||
LinphoneReasonForbidden, /**< Authentication failed due to bad credentials or resource forbidden */
|
||||
LinphoneReasonDeclined, /**< The call has been declined */
|
||||
LinphoneReasonNotFound, /**< Destination of the call was not found */
|
||||
LinphoneReasonNotAnswered, /**< The call was not answered in time (request timeout) */
|
||||
LinphoneReasonBusy, /**< Phone line was busy */
|
||||
LinphoneReasonUnsupportedContent, /**< Unsupported content */
|
||||
LinphoneReasonIOError, /**< Transport error: connection failures, disconnections etc... */
|
||||
LinphoneReasonDoNotDisturb, /**< Do not disturb reason */
|
||||
LinphoneReasonUnauthorized, /**< Operation is unauthorized because missing credential */
|
||||
LinphoneReasonNotAcceptable, /**< Operation is rejected due to incompatible or unsupported media parameters */
|
||||
LinphoneReasonNoMatch, /**< Operation could not be executed by server or remote client because it didn't have any context for it */
|
||||
LinphoneReasonMovedPermanently, /**< Resource moved permanently */
|
||||
LinphoneReasonGone, /**< Resource no longer exists */
|
||||
LinphoneReasonTemporarilyUnavailable, /**< Temporarily unavailable */
|
||||
LinphoneReasonAddressIncomplete, /**< Address incomplete */
|
||||
LinphoneReasonNotImplemented, /**< Not implemented */
|
||||
LinphoneReasonBadGateway, /**< Bad gateway */
|
||||
LinphoneReasonServerTimeout, /**< Server timeout */
|
||||
LinphoneReasonUnknown /**< Unknown reason */
|
||||
};
|
||||
|
||||
#define LinphoneReasonBadCredentials LinphoneReasonForbidden
|
||||
|
||||
/*for compatibility*/
|
||||
#define LinphoneReasonMedia LinphoneReasonUnsupportedContent
|
||||
|
||||
/**
|
||||
* Enum describing failure reasons.
|
||||
**/
|
||||
typedef enum _LinphoneReason LinphoneReason;
|
||||
|
||||
/**
|
||||
* Object representing full details about a signaling error or status.
|
||||
* All LinphoneErrorInfo object returned by the liblinphone API are readonly and transcients. For safety they must be used immediately
|
||||
* after obtaining them. Any other function call to the liblinphone may change their content or invalidate the pointer.
|
||||
**/
|
||||
typedef struct _LinphoneErrorInfo LinphoneErrorInfo;
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Converts a LinphoneReason enum to a string.
|
||||
* @param[in] err A #LinphoneReason
|
||||
* @return The string representation of the specified LinphoneReason
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_reason_to_string(LinphoneReason err);
|
||||
|
||||
/**
|
||||
* Converts an error code to a LinphoneReason.
|
||||
* @param[in] err An error code
|
||||
* @return The LinphoneReason corresponding to the specified error code
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneReason linphone_error_code_to_reason(int err);
|
||||
|
||||
/**
|
||||
* Converts a LinphoneReason to an error code.
|
||||
* @param[in] reason A LinphoneReason
|
||||
* @return The error code corresponding to the specified LinphoneReason
|
||||
* @addtogroup misc
|
||||
* @{
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_reason_to_error_code(LinphoneReason reason);
|
||||
|
||||
/**
|
||||
* Get reason code from the error info.
|
||||
|
|
|
|||
|
|
@ -16,82 +16,22 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
#ifndef LINPHONEEVENT_H
|
||||
#define LINPHONEEVENT_H
|
||||
|
||||
#ifndef LINPHONE_EVENT_H_
|
||||
#define LINPHONE_EVENT_H_
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
/**
|
||||
* @addtogroup event_api
|
||||
* @{
|
||||
**/
|
||||
|
||||
struct _LinphoneEvent;
|
||||
|
||||
/**
|
||||
* Object representing an event state, which is subcribed or published.
|
||||
* @see linphone_core_publish()
|
||||
* @see linphone_core_subscribe()
|
||||
**/
|
||||
typedef struct _LinphoneEvent LinphoneEvent;
|
||||
|
||||
/**
|
||||
* Enum for subscription direction (incoming or outgoing).
|
||||
**/
|
||||
enum _LinphoneSubscriptionDir{
|
||||
LinphoneSubscriptionIncoming, /**< Incoming subscription. */
|
||||
LinphoneSubscriptionOutgoing, /**< Outgoing subscription. */
|
||||
LinphoneSubscriptionInvalidDir /**< Invalid subscription direction. */
|
||||
};
|
||||
|
||||
/**
|
||||
* Typedef alias for _LinphoneSubscriptionDir
|
||||
**/
|
||||
typedef enum _LinphoneSubscriptionDir LinphoneSubscriptionDir;
|
||||
|
||||
/**
|
||||
* Enum for subscription states.
|
||||
* LinphoneSubscriptionTerminated and LinphoneSubscriptionError are final states.
|
||||
**/
|
||||
enum _LinphoneSubscriptionState{
|
||||
LinphoneSubscriptionNone, /**< Initial state, should not be used.**/
|
||||
LinphoneSubscriptionOutgoingProgress, /**<An outgoing subcription was sent*/
|
||||
LinphoneSubscriptionIncomingReceived, /**<An incoming subcription is received*/
|
||||
LinphoneSubscriptionPending, /**<Subscription is pending, waiting for user approval*/
|
||||
LinphoneSubscriptionActive, /**<Subscription is accepted.*/
|
||||
LinphoneSubscriptionTerminated, /**<Subscription is terminated normally*/
|
||||
LinphoneSubscriptionError, /**<Subscription was terminated by an error, indicated by linphone_event_get_reason().*/
|
||||
LinphoneSubscriptionExpiring, /**<Subscription is about to expire, only sent if [sip]->refresh_generic_subscribe property is set to 0.*/
|
||||
};
|
||||
|
||||
/**
|
||||
* Typedef for subscription state enum.
|
||||
**/
|
||||
typedef enum _LinphoneSubscriptionState LinphoneSubscriptionState;
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_subscription_state_to_string(LinphoneSubscriptionState state);
|
||||
|
||||
/**
|
||||
* Enum for publish states.
|
||||
**/
|
||||
enum _LinphonePublishState{
|
||||
LinphonePublishNone, /**< Initial state, do not use**/
|
||||
LinphonePublishProgress, /**<An outgoing publish was created and submitted*/
|
||||
LinphonePublishOk, /**<Publish is accepted.*/
|
||||
LinphonePublishError, /**<Publish encoutered an error, linphone_event_get_reason() gives reason code*/
|
||||
LinphonePublishExpiring, /**<Publish is about to expire, only sent if [sip]->refresh_generic_publish property is set to 0.*/
|
||||
LinphonePublishCleared /**<Event has been un published*/
|
||||
};
|
||||
|
||||
/**
|
||||
* Typedef for publish state enum
|
||||
**/
|
||||
typedef enum _LinphonePublishState LinphonePublishState;
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_publish_state_to_string(LinphonePublishState state);
|
||||
|
||||
/**
|
||||
* Callback prototype for notifying the application about notification received from the network.
|
||||
**/
|
||||
typedef void (*LinphoneCoreCbsNotifyReceivedCb)(LinphoneCore *lc, LinphoneEvent *lev, const char *notified_event, const LinphoneContent *body);
|
||||
|
||||
/**
|
||||
* Old name of #LinphoneCoreCbsNotifyReceivedCb.
|
||||
*/
|
||||
|
|
@ -101,6 +41,7 @@ typedef LinphoneCoreCbsNotifyReceivedCb LinphoneCoreNotifyReceivedCb;
|
|||
* Callback prototype for notifying the application about changes of subscription states, including arrival of new subscriptions.
|
||||
**/
|
||||
typedef void (*LinphoneCoreCbsSubscriptionStateChangedCb)(LinphoneCore *lc, LinphoneEvent *lev, LinphoneSubscriptionState state);
|
||||
|
||||
/**
|
||||
* Old name of #LinphoneCoreCbsSubscriptionStateChangedCb.
|
||||
*/
|
||||
|
|
@ -110,46 +51,12 @@ typedef LinphoneCoreCbsSubscriptionStateChangedCb LinphoneCoreSubscriptionStateC
|
|||
* Callback prototype for notifying the application about changes of publish states.
|
||||
**/
|
||||
typedef void (*LinphoneCoreCbsPublishStateChangedCb)(LinphoneCore *lc, LinphoneEvent *lev, LinphonePublishState state);
|
||||
|
||||
/**
|
||||
* Old name of LinphoneCoreCbsPublishStateChangedCb.
|
||||
*/
|
||||
typedef LinphoneCoreCbsPublishStateChangedCb LinphoneCorePublishStateChangedCb;
|
||||
|
||||
/**
|
||||
* Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body.
|
||||
* If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before.
|
||||
* @param lc the #LinphoneCore
|
||||
* @param resource the destination resource
|
||||
* @param event the event name
|
||||
* @param expires the whished duration of the subscription
|
||||
* @param body an optional body, may be NULL.
|
||||
* @return a LinphoneEvent holding the context of the created subcription.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneEvent *linphone_core_subscribe(LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires, const LinphoneContent *body);
|
||||
|
||||
/**
|
||||
* Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body.
|
||||
* If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before.
|
||||
* Unlike linphone_core_subscribe() the subscription isn't sent immediately. It will be send when calling linphone_event_send_subscribe().
|
||||
* @param lc the #LinphoneCore
|
||||
* @param resource the destination resource
|
||||
* @param event the event name
|
||||
* @param expires the whished duration of the subscription
|
||||
* @return a LinphoneEvent holding the context of the created subcription.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneEvent *linphone_core_create_subscribe(LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires);
|
||||
|
||||
|
||||
/**
|
||||
* Create an out-of-dialog notification, specifying the destination resource, the event name.
|
||||
* The notification can be send with linphone_event_notify().
|
||||
* @param lc the #LinphoneCore
|
||||
* @param resource the destination resource
|
||||
* @param event the event name
|
||||
* @return a LinphoneEvent holding the context of the notification.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneEvent *linphone_core_create_notify(LinphoneCore *lc, const LinphoneAddress *resource, const char *event);
|
||||
|
||||
|
||||
/**
|
||||
* Send a subscription previously created by linphone_core_create_subscribe().
|
||||
|
|
@ -178,10 +85,12 @@ LINPHONE_PUBLIC int linphone_event_refresh_subscribe(LinphoneEvent *lev);
|
|||
* Accept an incoming subcription.
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_event_accept_subscription(LinphoneEvent *lev);
|
||||
|
||||
/**
|
||||
* Deny an incoming subscription with given reason.
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason);
|
||||
|
||||
/**
|
||||
* Send a notification.
|
||||
* @param lev a #LinphoneEvent corresponding to an incoming subscription previously received and accepted.
|
||||
|
|
@ -190,45 +99,6 @@ LINPHONE_PUBLIC int linphone_event_deny_subscription(LinphoneEvent *lev, Linphon
|
|||
**/
|
||||
LINPHONE_PUBLIC int linphone_event_notify(LinphoneEvent *lev, const LinphoneContent *body);
|
||||
|
||||
|
||||
/**
|
||||
* Publish an event state.
|
||||
* This first create a LinphoneEvent with linphone_core_create_publish() and calls linphone_event_send_publish() to actually send it.
|
||||
* After expiry, the publication is refreshed unless it is terminated before.
|
||||
* @param lc the #LinphoneCore
|
||||
* @param resource the resource uri for the event
|
||||
* @param event the event name
|
||||
* @param expires the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
|
||||
* @param body the actual published data
|
||||
* @return the LinphoneEvent holding the context of the publish.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneEvent *linphone_core_publish(LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires, const LinphoneContent *body);
|
||||
|
||||
/**
|
||||
* Create a publish context for an event state.
|
||||
* After being created, the publish must be sent using linphone_event_send_publish().
|
||||
* After expiry, the publication is refreshed unless it is terminated before.
|
||||
* @param lc the #LinphoneCore
|
||||
* @param resource the resource uri for the event
|
||||
* @param event the event name
|
||||
* @param expires the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
|
||||
* @return the LinphoneEvent holding the context of the publish.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneEvent *linphone_core_create_publish(LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires);
|
||||
|
||||
|
||||
/**
|
||||
* Create a publish context for a one-shot publish.
|
||||
* After being created, the publish must be sent using linphone_event_send_publish().
|
||||
* The LinphoneEvent is automatically terminated when the publish transaction is finished, either with success or failure.
|
||||
* The application must not call linphone_event_terminate() for such one-shot publish.
|
||||
* @param lc the #LinphoneCore
|
||||
* @param resource the resource uri for the event
|
||||
* @param event the event name
|
||||
* @return the LinphoneEvent holding the context of the publish.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneEvent *linphone_core_create_one_shot_publish(LinphoneCore *lc, const LinphoneAddress *resource, const char *event);
|
||||
|
||||
/**
|
||||
* Send a publish created by linphone_core_create_publish().
|
||||
* @param lev the #LinphoneEvent
|
||||
|
|
@ -318,7 +188,6 @@ LINPHONE_PUBLIC const char *linphone_event_get_custom_header(LinphoneEvent *ev,
|
|||
**/
|
||||
LINPHONE_PUBLIC void linphone_event_terminate(LinphoneEvent *lev);
|
||||
|
||||
|
||||
/**
|
||||
* Increase reference count of LinphoneEvent.
|
||||
* By default LinphoneEvents created by the core are owned by the core only.
|
||||
|
|
@ -359,4 +228,4 @@ LINPHONE_PUBLIC LinphoneCore *linphone_event_get_core(const LinphoneEvent *lev);
|
|||
**/
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* LINPHONE_EVENT_H_ */
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_FACTORY_H
|
||||
#define LINPHONE_FACTORY_H
|
||||
|
||||
#include "linphone/core.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef _cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
|
@ -31,12 +31,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* #LinphoneFactory is a singleton object devoted to the creation of all the object
|
||||
* of Liblinphone that cannot created by #LinphoneCore or #LinphoneCore itself.
|
||||
*/
|
||||
typedef struct _LinphoneFactory LinphoneFactory;
|
||||
|
||||
/**
|
||||
* Create the #LinphoneFactory if that has not been done and return
|
||||
* a pointer on it.
|
||||
|
|
@ -128,7 +122,7 @@ LINPHONE_PUBLIC LinphoneVcard *linphone_factory_create_vcard(LinphoneFactory *fa
|
|||
* @}
|
||||
*/
|
||||
|
||||
#ifdef _cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -17,11 +17,10 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONEFRIEND_H_
|
||||
#define LINPHONEFRIEND_H_
|
||||
#ifndef LINPHONE_FRIEND_H_
|
||||
#define LINPHONE_FRIEND_H_
|
||||
|
||||
#include "linphonepresence.h"
|
||||
#include "vcard.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -31,90 +30,6 @@ extern "C" {
|
|||
* @addtogroup buddy_list
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* Enum controlling behavior for incoming subscription request.
|
||||
* <br> Use by linphone_friend_set_inc_subscribe_policy()
|
||||
*/
|
||||
typedef enum _LinphoneSubscribePolicy {
|
||||
/**
|
||||
* Does not automatically accept an incoming subscription request.
|
||||
* This policy implies that a decision has to be taken for each incoming subscription request notified by callback LinphoneCoreVTable.new_subscription_requested
|
||||
*
|
||||
*/
|
||||
LinphoneSPWait,
|
||||
/**
|
||||
* Rejects incoming subscription request.
|
||||
*/
|
||||
LinphoneSPDeny,
|
||||
/**
|
||||
* Automatically accepts a subscription request.
|
||||
*/
|
||||
LinphoneSPAccept
|
||||
} LinphoneSubscribePolicy;
|
||||
|
||||
/**
|
||||
* Enum describing remote friend status
|
||||
* @deprecated Use #LinphonePresenceModel and #LinphonePresenceActivity instead
|
||||
*/
|
||||
typedef enum _LinphoneOnlineStatus{
|
||||
/**
|
||||
* Offline
|
||||
*/
|
||||
LinphoneStatusOffline,
|
||||
/**
|
||||
* Online
|
||||
*/
|
||||
LinphoneStatusOnline,
|
||||
/**
|
||||
* Busy
|
||||
*/
|
||||
LinphoneStatusBusy,
|
||||
/**
|
||||
* Be right back
|
||||
*/
|
||||
LinphoneStatusBeRightBack,
|
||||
/**
|
||||
* Away
|
||||
*/
|
||||
LinphoneStatusAway,
|
||||
/**
|
||||
* On the phone
|
||||
*/
|
||||
LinphoneStatusOnThePhone,
|
||||
/**
|
||||
* Out to lunch
|
||||
*/
|
||||
LinphoneStatusOutToLunch,
|
||||
/**
|
||||
* Do not disturb
|
||||
*/
|
||||
LinphoneStatusDoNotDisturb,
|
||||
/**
|
||||
* Moved in this sate, call can be redirected if an alternate contact address has been set using function linphone_core_set_presence_info()
|
||||
*/
|
||||
LinphoneStatusMoved,
|
||||
/**
|
||||
* Using another messaging service
|
||||
*/
|
||||
LinphoneStatusAltService,
|
||||
/**
|
||||
* Pending
|
||||
*/
|
||||
LinphoneStatusPending,
|
||||
/**
|
||||
* Vacation
|
||||
*/
|
||||
LinphoneStatusVacation,
|
||||
|
||||
LinphoneStatusEnd
|
||||
}LinphoneOnlineStatus;
|
||||
|
||||
|
||||
struct _LinphoneFriend;
|
||||
/**
|
||||
* Represents a buddy, all presence actions like subscription and status change notification are performed on this object
|
||||
*/
|
||||
typedef struct _LinphoneFriend LinphoneFriend;
|
||||
|
||||
/**
|
||||
* Contructor
|
||||
|
|
@ -357,130 +272,6 @@ LINPHONE_PUBLIC const char *linphone_friend_get_ref_key(const LinphoneFriend *lf
|
|||
**/
|
||||
LINPHONE_PUBLIC bool_t linphone_friend_in_list(const LinphoneFriend *lf);
|
||||
|
||||
|
||||
/**
|
||||
* Return humain readable presence status
|
||||
* @param ss
|
||||
* @deprecated Use #LinphonePresenceModel, #LinphonePresenceActivity and linphone_presence_activity_to_string() instead.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char *linphone_online_status_to_string(LinphoneOnlineStatus ss);
|
||||
|
||||
|
||||
/**
|
||||
* Create a default LinphoneFriend.
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @return The created #LinphoneFriend object
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriend * linphone_core_create_friend(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Create a LinphoneFriend from the given address.
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @param[in] address A string containing the address to create the LinphoneFriend from
|
||||
* @return The created #LinphoneFriend object
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriend * linphone_core_create_friend_with_address(LinphoneCore *lc, const char *address);
|
||||
|
||||
/**
|
||||
* Set my presence status
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @param[in] minutes_away how long in away
|
||||
* @param[in] alternative_contact sip uri used to redirect call in state #LinphoneStatusMoved
|
||||
* @param[in] os #LinphoneOnlineStatus
|
||||
* @deprecated Use linphone_core_set_presence_model() instead
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,const char *alternative_contact,LinphoneOnlineStatus os);
|
||||
|
||||
/**
|
||||
* Set my presence model
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @param[in] presence #LinphonePresenceModel
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_set_presence_model(LinphoneCore *lc, LinphonePresenceModel *presence);
|
||||
|
||||
/**
|
||||
* Get my presence status
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @return #LinphoneOnlineStatus
|
||||
* @deprecated Use linphone_core_get_presence_model() instead
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Get my presence model
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @return A #LinphonePresenceModel object, or NULL if no presence model has been set.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_get_presence_model(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* @deprecated Use linphone_core_interpret_url() instead
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result);
|
||||
|
||||
/**
|
||||
* Add a friend to the current buddy list, if \link linphone_friend_enable_subscribes() subscription attribute \endlink is set, a SIP SUBSCRIBE message is sent.
|
||||
* @param lc #LinphoneCore object
|
||||
* @param fr #LinphoneFriend to add
|
||||
* @deprecated use linphone_friend_list_add_friend() instead.
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *fr);
|
||||
|
||||
/**
|
||||
* Removes a friend from the buddy list
|
||||
* @param lc #LinphoneCore object
|
||||
* @param fr #LinphoneFriend to remove
|
||||
* @deprecated use linphone_friend_list_remove_friend() instead.
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend *fr);
|
||||
|
||||
/**
|
||||
* Black list a friend. same as linphone_friend_set_inc_subscribe_policy() with #LinphoneSPDeny policy;
|
||||
* @param lc #LinphoneCore object
|
||||
* @param lf #LinphoneFriend to add
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneFriend *lf);
|
||||
|
||||
/**
|
||||
* Get Buddy list of LinphoneFriend
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @return \bctbx_list{LinphoneFriend}
|
||||
* @deprecated use linphone_core_get_friends_lists() or linphone_friend_list_get_friends() instead.
|
||||
*/
|
||||
LINPHONE_PUBLIC const bctbx_list_t * linphone_core_get_friend_list(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Notify all friends that have subscribed
|
||||
* @param lc #LinphoneCore object
|
||||
* @param presence #LinphonePresenceModel to notify
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_notify_all_friends(LinphoneCore *lc, LinphonePresenceModel *presence);
|
||||
|
||||
/**
|
||||
* Search a LinphoneFriend by its address.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] addr The address to use to search the friend.
|
||||
* @return The #LinphoneFriend object corresponding to the given address.
|
||||
* @deprecated use linphone_core_find_friend() instead.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, const char *addr);
|
||||
|
||||
/**
|
||||
* Search a LinphoneFriend by its address.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] addr The address to use to search the friend.
|
||||
* @return The #LinphoneFriend object corresponding to the given address.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriend *linphone_core_find_friend(const LinphoneCore *lc, const LinphoneAddress *addr);
|
||||
|
||||
/**
|
||||
* Search a LinphoneFriend by its reference key.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] key The reference key to use to search the friend.
|
||||
* @return The #LinphoneFriend object corresponding to the given reference key.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriend *linphone_core_get_friend_by_ref_key(const LinphoneCore *lc, const char *key);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the linphone friend.
|
||||
* @param[in] lf LinphoneFriend object
|
||||
|
|
@ -528,22 +319,6 @@ LINPHONE_PUBLIC bool_t linphone_friend_create_vcard(LinphoneFriend *fr, const ch
|
|||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriend *linphone_friend_new_from_vcard(LinphoneVcard *vcard);
|
||||
|
||||
/**
|
||||
* Sets the database filename where friends will be stored.
|
||||
* If the file does not exist, it will be created.
|
||||
* @ingroup initializing
|
||||
* @param lc the linphone core
|
||||
* @param path filesystem path
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_set_friends_database_path(LinphoneCore *lc, const char *path);
|
||||
|
||||
/**
|
||||
* Migrates the friends from the linphonerc to the database if not done yet
|
||||
* @ingroup initializing
|
||||
* @param lc the linphone core
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_migrate_friends_from_rc_to_db(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Saves a friend either in database if configured, otherwise in linphonerc
|
||||
* @param fr the linphone friend to save
|
||||
|
|
@ -559,4 +334,4 @@ LINPHONE_PUBLIC void linphone_friend_save(LinphoneFriend *fr, LinphoneCore *lc);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONEFRIEND_H_ */
|
||||
#endif /* LINPHONE_FRIEND_H_ */
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_FRIENDLIST_H_
|
||||
|
||||
|
||||
#include "linphone/friend.h"
|
||||
#include "linphone/presence.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -35,64 +34,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enum describing the status of a LinphoneFriendList operation.
|
||||
**/
|
||||
typedef enum _LinphoneFriendListStatus {
|
||||
LinphoneFriendListOK,
|
||||
LinphoneFriendListNonExistentFriend,
|
||||
LinphoneFriendListInvalidFriend
|
||||
} LinphoneFriendListStatus;
|
||||
|
||||
/**
|
||||
* Enum describing the status of a CardDAV synchronization
|
||||
*/
|
||||
typedef enum _LinphoneFriendListSyncStatus {
|
||||
LinphoneFriendListSyncStarted,
|
||||
LinphoneFriendListSyncSuccessful,
|
||||
LinphoneFriendListSyncFailure
|
||||
} LinphoneFriendListSyncStatus;
|
||||
|
||||
/**
|
||||
* The LinphoneFriendList object representing a list of friends.
|
||||
**/
|
||||
typedef struct _LinphoneFriendList LinphoneFriendList;
|
||||
|
||||
/**
|
||||
* Create a new empty LinphoneFriendList object.
|
||||
* @param[in] lc LinphoneCore object.
|
||||
* @return A new LinphoneFriendList object.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneFriendList * linphone_core_create_friend_list(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Add a friend list.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @param[in] list LinphoneFriendList object
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_add_friend_list(LinphoneCore *lc, LinphoneFriendList *list);
|
||||
|
||||
/**
|
||||
* Removes a friend list.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @param[in] list LinphoneFriendList object
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_remove_friend_list(LinphoneCore *lc, LinphoneFriendList *list);
|
||||
|
||||
/**
|
||||
* Retrieves the list of LinphoneFriendList from the core.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @return \bctbx_list{LinphoneFriendList} a list of LinphoneFriendList
|
||||
*/
|
||||
LINPHONE_PUBLIC const bctbx_list_t * linphone_core_get_friends_lists(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Retrieves the first list of LinphoneFriend from the core.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @return the first LinphoneFriendList object or NULL
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriendList * linphone_core_get_default_friend_list(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the friend list.
|
||||
* @param[in] list LinphoneFriendList object.
|
||||
|
|
@ -148,7 +89,6 @@ LINPHONE_PUBLIC const char * linphone_friend_list_get_rls_uri(const LinphoneFrie
|
|||
**/
|
||||
LINPHONE_PUBLIC void linphone_friend_list_set_rls_uri(LinphoneFriendList *list, const char *rls_uri);
|
||||
|
||||
|
||||
/**
|
||||
* Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.
|
||||
* @param[in] list LinphoneFriendList object.
|
||||
|
|
@ -254,11 +194,6 @@ LINPHONE_PUBLIC void linphone_friend_list_set_uri(LinphoneFriendList *list, cons
|
|||
*/
|
||||
LINPHONE_PUBLIC void linphone_friend_list_update_revision(LinphoneFriendList *list, int rev);
|
||||
|
||||
/**
|
||||
* An object to handle the callbacks for LinphoneFriend synchronization.
|
||||
**/
|
||||
typedef struct _LinphoneFriendListCbs LinphoneFriendListCbs;
|
||||
|
||||
/**
|
||||
* Callback used to notify a new contact has been created on the CardDAV server and downloaded locally
|
||||
* @param list The LinphoneFriendList object the new contact is added to
|
||||
|
|
|
|||
|
|
@ -20,18 +20,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_IM_ENCRYPTION_ENGINE_H
|
||||
#define LINPHONE_IM_ENCRYPTION_ENGINE_H
|
||||
|
||||
#include <mediastreamer2/mscommon.h>
|
||||
#include "linphone/types.h"
|
||||
|
||||
/**
|
||||
* @addtogroup misc
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* IM encryption engine.
|
||||
*/
|
||||
typedef struct _LinphoneImEncryptionEngine LinphoneImEncryptionEngine;
|
||||
|
||||
/**
|
||||
* Callback to decrypt incoming LinphoneChatMessage
|
||||
* @param engine ImEncryptionEngine object
|
||||
|
|
@ -90,11 +85,6 @@ typedef int (*LinphoneImEncryptionEngineCbsDownloadingFileCb)(LinphoneImEncrypti
|
|||
*/
|
||||
typedef int (*LinphoneImEncryptionEngineCbsUploadingFileCb)(LinphoneImEncryptionEngine *engine, LinphoneChatMessage *msg, size_t offset, const char *buffer, size_t *size, char *encrypted_buffer);
|
||||
|
||||
/**
|
||||
* An object to handle the callbacks for the handling a LinphoneImEncryptionEngine object.
|
||||
*/
|
||||
typedef struct _LinphoneImEncryptionEngineCbs LinphoneImEncryptionEngineCbs;
|
||||
|
||||
/**
|
||||
* Acquire a reference to the LinphoneImEncryptionEngineCbs.
|
||||
* @param[in] cbs LinphoneImEncryptionEngineCbs object.
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_IM_NOTIF_POLICY_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -31,13 +34,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Policy to use to send/receive instant messaging composing/delivery/display notifications.
|
||||
* The sending of this information is done as in the RFCs 3994 (is_composing) and 5438 (imdn delivered/displayed).
|
||||
*/
|
||||
typedef struct _LinphoneImNotifPolicy LinphoneImNotifPolicy;
|
||||
|
||||
|
||||
/**
|
||||
* Acquire a reference to the LinphoneImNotifPolicy object.
|
||||
* @param[in] policy LinphoneImNotifPolicy object.
|
||||
|
|
@ -161,13 +157,6 @@ LINPHONE_PUBLIC bool_t linphone_im_notif_policy_get_recv_imdn_displayed(const Li
|
|||
*/
|
||||
LINPHONE_PUBLIC void linphone_im_notif_policy_set_recv_imdn_displayed(LinphoneImNotifPolicy *policy, bool_t enable);
|
||||
|
||||
/**
|
||||
* Get the LinphoneImNotifPolicy object controlling the instant messaging notifications.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @return A LinphoneImNotifPolicy object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneImNotifPolicy * linphone_core_get_im_notif_policy(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
84
include/linphone/info_message.h
Normal file
84
include/linphone/info_message.h
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
info_message.h
|
||||
Copyright (C) 2010-2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_INFO_MESSAGE_H_
|
||||
#define LINPHONE_INFO_MESSAGE_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup misc
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Add a header to an info message to be sent.
|
||||
* @param im the info message
|
||||
* @param name the header'name
|
||||
* @param value the header's value
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_info_message_add_header(LinphoneInfoMessage *im, const char *name, const char *value);
|
||||
|
||||
/**
|
||||
* Obtain a header value from a received info message.
|
||||
* @param im the info message
|
||||
* @param name the header'name
|
||||
* @return the corresponding header's value, or NULL if not exists.
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_info_message_get_header(const LinphoneInfoMessage *im, const char *name);
|
||||
|
||||
/**
|
||||
* Assign a content to the info message.
|
||||
* @param im the linphone info message
|
||||
* @param content the content described as a #LinphoneContent structure.
|
||||
* All fields of the LinphoneContent are copied, thus the application can destroy/modify/recycloe the content object freely ater the function returns.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_info_message_set_content(LinphoneInfoMessage *im, const LinphoneContent *content);
|
||||
|
||||
/**
|
||||
* Returns the info message's content as a #LinphoneContent structure.
|
||||
**/
|
||||
LINPHONE_PUBLIC const LinphoneContent * linphone_info_message_get_content(const LinphoneInfoMessage *im);
|
||||
|
||||
/**
|
||||
* Destroy a LinphoneInfoMessage
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_info_message_destroy(LinphoneInfoMessage *im);
|
||||
|
||||
LINPHONE_PUBLIC LinphoneInfoMessage *linphone_info_message_copy(const LinphoneInfoMessage *orig);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONE_INFO_MESSAGE_H_ */
|
||||
|
|
@ -14,28 +14,43 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_LDAPPROVIDER_H_
|
||||
#define LINPHONE_LDAPPROVIDER_H_
|
||||
|
||||
|
||||
#include "linphone/contactprovider.h"
|
||||
|
||||
|
||||
typedef struct _LinphoneLDAPContactProvider LinphoneLDAPContactProvider;
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* LinphoneLDAPContactSearch */
|
||||
typedef struct _LinphoneLDAPContactSearch LinphoneLDAPContactSearch;
|
||||
|
||||
LinphoneLDAPContactSearch* linphone_ldap_contact_search_create(LinphoneLDAPContactProvider* ld,
|
||||
const char* predicate,
|
||||
ContactSearchCallback cb,
|
||||
void* cb_data);
|
||||
LinphoneLDAPContactSearch * linphone_ldap_contact_search_create(LinphoneLDAPContactProvider *ld, const char *predicate, ContactSearchCallback cb, void *cb_data);
|
||||
|
||||
LINPHONE_PUBLIC unsigned int linphone_ldap_contact_search_result_count(LinphoneLDAPContactSearch* obj);
|
||||
LINPHONE_PUBLIC LinphoneLDAPContactSearch* linphone_ldap_contact_search_cast( void* obj );
|
||||
LINPHONE_PUBLIC unsigned int linphone_ldap_contact_search_result_count(LinphoneLDAPContactSearch *obj);
|
||||
|
||||
LINPHONE_PUBLIC LinphoneLDAPContactSearch * linphone_ldap_contact_search_cast(void *obj);
|
||||
|
||||
|
||||
/* LinphoneLDAPContactProvider */
|
||||
|
||||
LINPHONE_PUBLIC LinphoneLDAPContactProvider* linphone_ldap_contact_provider_create(LinphoneCore* lc, const LinphoneDictionary* config);
|
||||
LINPHONE_PUBLIC unsigned int linphone_ldap_contact_provider_get_max_result(const LinphoneLDAPContactProvider* obj);
|
||||
LINPHONE_PUBLIC LinphoneLDAPContactProvider* linphone_ldap_contact_provider_ref( void* obj );
|
||||
void linphone_ldap_contact_provider_unref( void* obj );
|
||||
LinphoneLDAPContactProvider* linphone_ldap_contact_provider_cast( void* obj );
|
||||
LINPHONE_PUBLIC int linphone_ldap_contact_provider_available(void);
|
||||
LINPHONE_PUBLIC LinphoneLDAPContactProvider * linphone_ldap_contact_provider_create(LinphoneCore *lc, const LinphoneDictionary *config);
|
||||
|
||||
LINPHONE_PUBLIC unsigned int linphone_ldap_contact_provider_get_max_result(const LinphoneLDAPContactProvider *obj);
|
||||
|
||||
LINPHONE_PUBLIC LinphoneLDAPContactProvider * linphone_ldap_contact_provider_ref(void *obj);
|
||||
|
||||
void linphone_ldap_contact_provider_unref(void *obj);
|
||||
|
||||
LinphoneLDAPContactProvider * linphone_ldap_contact_provider_cast(void *obj);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_ldap_contact_provider_available(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* LINPHONE_LDAPPROVIDER_H_ */
|
||||
|
|
|
|||
|
|
@ -25,39 +25,13 @@
|
|||
#ifndef LPCONFIG_H
|
||||
#define LPCONFIG_H
|
||||
|
||||
#include <mediastreamer2/mscommon.h>
|
||||
#include <ortp/port.h>
|
||||
#include "linphone/dictionary.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
/**
|
||||
* @addtogroup misc
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* The LinphoneConfig object is used to manipulate a configuration file.
|
||||
*
|
||||
* The format of the configuration file is a .ini like format:
|
||||
* - sections are defined in []
|
||||
* - each section contains a sequence of key=value pairs.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* [sound]
|
||||
* echocanceler=1
|
||||
* playback_dev=ALSA: Default device
|
||||
*
|
||||
* [video]
|
||||
* enabled=1
|
||||
* @endcode
|
||||
**/
|
||||
typedef struct _LpConfig LinphoneConfig;
|
||||
|
||||
/**
|
||||
* Define old struct name for backward compatibility
|
||||
*/
|
||||
#define LpConfig LinphoneConfig
|
||||
|
||||
/**
|
||||
* Safely downcast a belle_sip_object into LinphoneConfig
|
||||
*/
|
||||
|
|
|
|||
174
include/linphone/misc.h
Normal file
174
include/linphone/misc.h
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/*
|
||||
misc.h
|
||||
Copyright (C) 2010-2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_MISC_H_
|
||||
#define LINPHONE_MISC_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Lowest volume measurement that can be returned by linphone_call_get_play_volume() or linphone_call_get_record_volume(), corresponding to pure silence.
|
||||
* @ingroup call_misc
|
||||
**/
|
||||
#define LINPHONE_VOLUME_DB_LOWEST (-120) /* WARNING: keep this in sync with mediastreamer2/msvolume.h */
|
||||
|
||||
|
||||
/**
|
||||
* Disable a sip transport
|
||||
* Use with #LinphoneSipTransports
|
||||
* @ingroup initializing
|
||||
*/
|
||||
#define LC_SIP_TRANSPORT_DISABLED 0
|
||||
/**
|
||||
* Randomly chose a sip port for this transport
|
||||
* Use with #LinphoneSipTransports
|
||||
* @ingroup initializing
|
||||
*/
|
||||
#define LC_SIP_TRANSPORT_RANDOM (-1)
|
||||
|
||||
/**
|
||||
* Don't create any server socket for this transport, ie don't bind on any port.
|
||||
* Use with #LinphoneSipTransports
|
||||
* @ingroup initializing
|
||||
**/
|
||||
#define LC_SIP_TRANSPORT_DONTBIND (-2)
|
||||
|
||||
|
||||
/**
|
||||
* Function returning a human readable value for LinphoneStreamType.
|
||||
* @ingroup initializing
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_stream_type_to_string(const LinphoneStreamType);
|
||||
|
||||
/**
|
||||
* Human readable version of the #LinphoneRegistrationState
|
||||
* @param cs sate
|
||||
* @ingroup proxies
|
||||
*/
|
||||
LINPHONE_PUBLIC const char *linphone_registration_state_to_string(LinphoneRegistrationState cs);
|
||||
|
||||
/**
|
||||
* Convert enum member to string.
|
||||
* @ingroup media_parameters
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_media_encryption_to_string(LinphoneMediaEncryption menc);
|
||||
|
||||
LINPHONE_PUBLIC const char* linphone_privacy_to_string(LinphonePrivacy privacy);
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_subscription_state_to_string(LinphoneSubscriptionState state);
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_publish_state_to_string(LinphonePublishState state);
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_ice_state_to_string(LinphoneIceState state);
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_global_state_to_string(LinphoneGlobalState gs);
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_core_log_collection_upload_state_to_string(const LinphoneCoreLogCollectionUploadState lcus);
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_call_state_to_string(LinphoneCallState cs);
|
||||
|
||||
/**
|
||||
* Converts a _LinphoneConfiguringState enum to a string.
|
||||
* @ingroup misc
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_configuring_state_to_string(LinphoneConfiguringState cs);
|
||||
|
||||
/**
|
||||
* Returns a #LinphoneChatMessageState as a string.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_state_to_string(const LinphoneChatMessageState state);
|
||||
|
||||
/**
|
||||
* Converts a LinphoneReason enum to a string.
|
||||
* @param[in] err A #LinphoneReason
|
||||
* @return The string representation of the specified LinphoneReason
|
||||
* @ingroup misc
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_reason_to_string(LinphoneReason err);
|
||||
|
||||
/**
|
||||
* Return humain readable presence status
|
||||
* @param ss
|
||||
* @deprecated Use #LinphonePresenceModel, #LinphonePresenceActivity and linphone_presence_activity_to_string() instead.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char *linphone_online_status_to_string(LinphoneOnlineStatus ss);
|
||||
|
||||
/**
|
||||
* Convert a string into LinphoneTunnelMode enum
|
||||
* @param string String to convert
|
||||
* @return An LinphoneTunnelMode enum. If the passed string is NULL or
|
||||
* does not match with any mode, the LinphoneTunnelModeDisable is returned.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneTunnelMode linphone_tunnel_mode_from_string(const char *string);
|
||||
|
||||
/**
|
||||
* Convert a tunnel mode enum into string
|
||||
* @param mode Enum to convert
|
||||
* @return "disable", "enable" or "auto"
|
||||
*/
|
||||
LINPHONE_PUBLIC const char *linphone_tunnel_mode_to_string(LinphoneTunnelMode mode);
|
||||
|
||||
/**
|
||||
* Check whether Matroksa format is supported by the player
|
||||
* @return TRUE if it is supported
|
||||
*/
|
||||
LINPHONE_PUBLIC bool_t linphone_local_player_matroska_supported(void);
|
||||
|
||||
/**
|
||||
* Converts a LinphoneTransportType enum to a lowercase string.
|
||||
* @ingroup misc
|
||||
**/
|
||||
LINPHONE_PUBLIC const char* linphone_transport_to_string(LinphoneTransportType transport);
|
||||
|
||||
/**
|
||||
* Converts a lowercase string to a LinphoneTransportType enum.
|
||||
* @ingroup misc
|
||||
* @return Transport matching input, or LinphoneTransportUdp if nothing is found
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneTransportType linphone_transport_parse(const char* transport);
|
||||
|
||||
/**
|
||||
* Converts an error code to a LinphoneReason.
|
||||
* @param[in] err An error code
|
||||
* @return The LinphoneReason corresponding to the specified error code
|
||||
* @ingroup misc
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneReason linphone_error_code_to_reason(int err);
|
||||
|
||||
/**
|
||||
* Converts a LinphoneReason to an error code.
|
||||
* @param[in] reason A LinphoneReason
|
||||
* @return The error code corresponding to the specified LinphoneReason
|
||||
* @ingroup misc
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_reason_to_error_code(LinphoneReason reason);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONE_MISC_H_ */
|
||||
|
|
@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_NAT_POLICY_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -31,12 +34,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Policy to use to pass through NATs/firewalls.
|
||||
*/
|
||||
typedef struct _LinphoneNatPolicy LinphoneNatPolicy;
|
||||
|
||||
|
||||
/**
|
||||
* Acquire a reference to the LinphoneNatPolicy object.
|
||||
* @param[in] policy LinphoneNatPolicy object.
|
||||
|
|
@ -178,21 +175,6 @@ LINPHONE_PUBLIC void linphone_nat_policy_resolve_stun_server(LinphoneNatPolicy *
|
|||
*/
|
||||
LINPHONE_PUBLIC const struct addrinfo * linphone_nat_policy_get_stun_server_addrinfo(LinphoneNatPolicy *policy);
|
||||
|
||||
/**
|
||||
* Create a new LinphoneNatPolicy object with every policies being disabled.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @return A new LinphoneNatPolicy object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneNatPolicy * linphone_core_create_nat_policy(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Create a new LinphoneNatPolicy by reading the config of a LinphoneCore according to the passed ref.
|
||||
* @param[in] lc LinphoneCore object
|
||||
* @param[in] ref The reference of a NAT policy in the config of the LinphoneCore
|
||||
* @return A new LinphoneNatPolicy object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneNatPolicy * linphone_core_create_nat_policy_from_config(LinphoneCore *lc, const char *ref);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
74
include/linphone/payload_type.h
Normal file
74
include/linphone/payload_type.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
payload_type.h
|
||||
Copyright (C) 2010-2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_PAYLOAD_TYPE_H_
|
||||
#define LINPHONE_PAYLOAD_TYPE_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup media_parameters
|
||||
* @{
|
||||
**/
|
||||
|
||||
/**
|
||||
* Get the type of payload.
|
||||
* @param[in] pt LinphonePayloadType object
|
||||
* @return The type of payload.
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_payload_type_get_type(const LinphonePayloadType *pt);
|
||||
|
||||
/**
|
||||
* Get the normal bitrate in bits/s.
|
||||
* @param[in] pt LinphonePayloadType object
|
||||
* @return The normal bitrate in bits/s.
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_payload_type_get_normal_bitrate(const LinphonePayloadType *pt);
|
||||
|
||||
/**
|
||||
* Get the mime type.
|
||||
* @param[in] pt LinphonePayloadType object
|
||||
* @return The mime type.
|
||||
*/
|
||||
LINPHONE_PUBLIC const char * linphone_payload_type_get_mime_type(const LinphonePayloadType *pt);
|
||||
|
||||
/**
|
||||
* Get the number of channels.
|
||||
* @param[in] pt LinphonePayloadType object
|
||||
* @return The number of channels.
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_payload_type_get_channels(const LinphonePayloadType *pt);
|
||||
|
||||
/**
|
||||
* @}
|
||||
**/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONE_PAYLOAD_TYPE_H_ */
|
||||
64
include/linphone/player.h
Normal file
64
include/linphone/player.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
player.h
|
||||
Copyright (C) 2010-2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_PLAYER_H_
|
||||
#define LINPHONE_PLAYER_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
#include "mediastreamer2/msinterfaces.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Callback for notifying end of play (file).
|
||||
* @param obj the LinphonePlayer
|
||||
* @param user_data the user_data provided when calling linphone_player_open().
|
||||
* @ingroup call_control
|
||||
**/
|
||||
typedef void (*LinphonePlayerEofCallback)(LinphonePlayer *obj, void *user_data);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_player_start(LinphonePlayer *obj);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_player_pause(LinphonePlayer *obj);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_player_seek(LinphonePlayer *obj, int time_ms);
|
||||
|
||||
LINPHONE_PUBLIC MSPlayerState linphone_player_get_state(LinphonePlayer *obj);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_player_get_duration(LinphonePlayer *obj);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_player_get_current_position(LinphonePlayer *obj);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_player_close(LinphonePlayer *obj);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_player_destroy(LinphonePlayer *obj);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONE_PLAYER_H_ */
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
linphonepresence.h
|
||||
presence.h
|
||||
Copyright (C) 2010-2013 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
@ -17,8 +17,11 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONEPRESENCE_H_
|
||||
#define LINPHONEPRESENCE_H_
|
||||
#ifndef LINPHONE_PRESENCE_H_
|
||||
#define LINPHONE_PRESENCE_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -31,167 +34,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** Basic status as defined in section 4.1.4 of RFC 3863 */
|
||||
typedef enum LinphonePresenceBasicStatus {
|
||||
/** This value means that the associated contact element, if any, is ready to accept communication. */
|
||||
LinphonePresenceBasicStatusOpen,
|
||||
|
||||
/** This value means that the associated contact element, if any, is unable to accept communication. */
|
||||
LinphonePresenceBasicStatusClosed
|
||||
} LinphonePresenceBasicStatus;
|
||||
|
||||
/** Activities as defined in section 3.2 of RFC 4480 */
|
||||
typedef enum LinphonePresenceActivityType {
|
||||
/** This value is not defined in the RFC, it corresponds to no activity with a basic status of "closed". */
|
||||
LinphonePresenceActivityOffline,
|
||||
|
||||
/** This value is not defined in the RFC, it corresponds to no activity with a basic status of "open". */
|
||||
LinphonePresenceActivityOnline,
|
||||
|
||||
/** The person has a calendar appointment, without specifying exactly of what type. This activity is
|
||||
* indicated if more detailed information is not available or the person chooses not to reveal more
|
||||
* information. */
|
||||
LinphonePresenceActivityAppointment,
|
||||
|
||||
/** The person is physically away from all interactive communication devices. */
|
||||
LinphonePresenceActivityAway,
|
||||
|
||||
/** The person is eating the first meal of the day, usually eaten in the morning. */
|
||||
LinphonePresenceActivityBreakfast,
|
||||
|
||||
/** The person is busy, without further details. */
|
||||
LinphonePresenceActivityBusy,
|
||||
|
||||
/** The person is having his or her main meal of the day, eaten in the evening or at midday. */
|
||||
LinphonePresenceActivityDinner,
|
||||
|
||||
/** This is a scheduled national or local holiday. */
|
||||
LinphonePresenceActivityHoliday,
|
||||
|
||||
/** The person is riding in a vehicle, such as a car, but not steering. */
|
||||
LinphonePresenceActivityInTransit,
|
||||
|
||||
/** The person is looking for (paid) work. */
|
||||
LinphonePresenceActivityLookingForWork,
|
||||
|
||||
/** The person is eating his or her midday meal. */
|
||||
LinphonePresenceActivityLunch,
|
||||
|
||||
/** The person is scheduled for a meal, without specifying whether it is breakfast, lunch, or dinner,
|
||||
* or some other meal. */
|
||||
LinphonePresenceActivityMeal,
|
||||
|
||||
/** The person is in an assembly or gathering of people, as for a business, social, or religious purpose.
|
||||
* A meeting is a sub-class of an appointment. */
|
||||
LinphonePresenceActivityMeeting,
|
||||
|
||||
/** The person is talking on the telephone. */
|
||||
LinphonePresenceActivityOnThePhone,
|
||||
|
||||
/** The person is engaged in an activity with no defined representation. A string describing the activity
|
||||
* in plain text SHOULD be provided. */
|
||||
LinphonePresenceActivityOther,
|
||||
|
||||
/** A performance is a sub-class of an appointment and includes musical, theatrical, and cinematic
|
||||
* performances as well as lectures. It is distinguished from a meeting by the fact that the person
|
||||
* may either be lecturing or be in the audience, with a potentially large number of other people,
|
||||
* making interruptions particularly noticeable. */
|
||||
LinphonePresenceActivityPerformance,
|
||||
|
||||
/** The person will not return for the foreseeable future, e.g., because it is no longer working for
|
||||
* the company. */
|
||||
LinphonePresenceActivityPermanentAbsence,
|
||||
|
||||
/** The person is occupying himself or herself in amusement, sport, or other recreation. */
|
||||
LinphonePresenceActivityPlaying,
|
||||
|
||||
/** The person is giving a presentation, lecture, or participating in a formal round-table discussion. */
|
||||
LinphonePresenceActivityPresentation,
|
||||
|
||||
/** The person is visiting stores in search of goods or services. */
|
||||
LinphonePresenceActivityShopping,
|
||||
|
||||
/** The person is sleeping.*/
|
||||
LinphonePresenceActivitySleeping,
|
||||
|
||||
/** The person is observing an event, such as a sports event. */
|
||||
LinphonePresenceActivitySpectator,
|
||||
|
||||
/** The person is controlling a vehicle, watercraft, or plane. */
|
||||
LinphonePresenceActivitySteering,
|
||||
|
||||
/** The person is on a business or personal trip, but not necessarily in-transit. */
|
||||
LinphonePresenceActivityTravel,
|
||||
|
||||
/** The person is watching television. */
|
||||
LinphonePresenceActivityTV,
|
||||
|
||||
/** The activity of the person is unknown. */
|
||||
LinphonePresenceActivityUnknown,
|
||||
|
||||
/** A period of time devoted to pleasure, rest, or relaxation. */
|
||||
LinphonePresenceActivityVacation,
|
||||
|
||||
/** The person is engaged in, typically paid, labor, as part of a profession or job. */
|
||||
LinphonePresenceActivityWorking,
|
||||
|
||||
/** The person is participating in religious rites. */
|
||||
LinphonePresenceActivityWorship
|
||||
} LinphonePresenceActivityType;
|
||||
|
||||
/**
|
||||
* Structure holding the information about the presence of a person.
|
||||
*/
|
||||
struct _LinphonePresenceModel;
|
||||
|
||||
/**
|
||||
* Presence model type holding information about the presence of a person.
|
||||
*/
|
||||
typedef struct _LinphonePresenceModel LinphonePresenceModel;
|
||||
|
||||
/**
|
||||
* Structure holding the information about a presence service.
|
||||
*/
|
||||
struct _LinphonePresenceService;
|
||||
|
||||
/**
|
||||
* Structure holding the information about a presence person.
|
||||
*/
|
||||
struct _LinphonePresencePerson;
|
||||
|
||||
/**
|
||||
* Presence person holding information about a presence person.
|
||||
*/
|
||||
typedef struct _LinphonePresencePerson LinphonePresencePerson;
|
||||
|
||||
/**
|
||||
* Presence service type holding information about a presence service.
|
||||
*/
|
||||
typedef struct _LinphonePresenceService LinphonePresenceService;
|
||||
|
||||
/**
|
||||
* Structure holding the information about a presence activity.
|
||||
*/
|
||||
struct _LinphonePresenceActivity;
|
||||
|
||||
/**
|
||||
* Presence activity type holding information about a presence activity.
|
||||
*/
|
||||
typedef struct _LinphonePresenceActivity LinphonePresenceActivity;
|
||||
|
||||
/**
|
||||
* Structure holding the information about a presence note.
|
||||
*/
|
||||
struct _LinphonePresenceNote;
|
||||
|
||||
/**
|
||||
* Presence note type holding information about a presence note.
|
||||
*/
|
||||
typedef struct _LinphonePresenceNote LinphonePresenceNote;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* HELPER FUNCTIONS TO EASE ACCESS IN MOST SIMPLER CASES *
|
||||
****************************************************************************/
|
||||
|
|
@ -268,6 +110,7 @@ LINPHONE_PUBLIC int linphone_presence_model_set_contact(LinphonePresenceModel *m
|
|||
* @return 0 if successful, a value < 0 in case of error.
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_presence_model_set_presentity(LinphonePresenceModel *model, const LinphoneAddress *presentity);
|
||||
|
||||
/**
|
||||
* Gets the presentity of a presence model.
|
||||
* @param[in] model The #LinphonePresenceModel object to get the contact from.
|
||||
|
|
@ -882,73 +725,6 @@ LINPHONE_PUBLIC void linphone_presence_note_set_user_data(LinphonePresenceNote *
|
|||
LINPHONE_PUBLIC void * linphone_presence_note_get_user_data(const LinphonePresenceNote *note);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* LINPHONE CORE FUNCTIONS RELATED TO PRESENCE *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* Create a LinphonePresenceActivity with the given type and description.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] acttype The #LinphonePresenceActivityType to set for the activity.
|
||||
* @param[in] description An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.
|
||||
* @return The created #LinphonePresenceActivity object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresenceActivity * linphone_core_create_presence_activity(LinphoneCore *lc, LinphonePresenceActivityType acttype, const char *description);
|
||||
|
||||
/**
|
||||
* Create a default LinphonePresenceModel.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @return The created #LinphonePresenceModel object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Create a LinphonePresenceModel with the given activity type and activity description.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] acttype The #LinphonePresenceActivityType to set for the activity of the created model.
|
||||
* @param[in] description An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.
|
||||
* @return The created #LinphonePresenceModel object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model_with_activity(LinphoneCore *lc, LinphonePresenceActivityType acttype, const char *description);
|
||||
|
||||
/**
|
||||
* Create a LinphonePresenceModel with the given activity type, activity description, note content and note language.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] acttype The #LinphonePresenceActivityType to set for the activity of the created model.
|
||||
* @param[in] description An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.
|
||||
* @param[in] note The content of the note to be added to the created model.
|
||||
* @param[in] lang The language of the note to be added to the created model.
|
||||
* @return The created #LinphonePresenceModel object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model_with_activity_and_note(LinphoneCore *lc, LinphonePresenceActivityType acttype, const char *description, const char *note, const char *lang);
|
||||
|
||||
/**
|
||||
* Create a LinphonePresenceNote with the given content and language.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] content The content of the note to be created.
|
||||
* @param[in] lang The language of the note to be created.
|
||||
* @return The created #LinphonePresenceNote object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresenceNote * linphone_core_create_presence_note(LinphoneCore *lc, const char *content, const char *lang);
|
||||
|
||||
/**
|
||||
* Create a LinphonePresencePerson with the given id.
|
||||
* @param[in] lc #LinphoneCore object
|
||||
* @param[in] id The id of the person to be created.
|
||||
* @return The created #LinphonePresencePerson object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresencePerson * linphone_core_create_presence_person(LinphoneCore *lc, const char *id);
|
||||
|
||||
/**
|
||||
* Create a LinphonePresenceService with the given id, basic status and contact.
|
||||
* @param[in] lc #LinphoneCore object.
|
||||
* @param[in] id The id of the service to be created.
|
||||
* @param[in] basic_status The basic status of the service to be created.
|
||||
* @param[in] contact A string containing a contact information corresponding to the service to be created.
|
||||
* @return The created #LinphonePresenceService object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphonePresenceService * linphone_core_create_presence_service(LinphoneCore *lc, const char *id, LinphonePresenceBasicStatus basic_status, const char *contact);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_PROXY_CONFIG_H
|
||||
#define LINPHONE_PROXY_CONFIG_H
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup proxies
|
||||
* @{
|
||||
|
|
@ -382,7 +388,9 @@ LINPHONE_PUBLIC const char* linphone_proxy_config_get_transport(const LinphonePr
|
|||
LINPHONE_PUBLIC void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type);
|
||||
|
||||
LINPHONE_PUBLIC SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg);
|
||||
|
||||
LINPHONE_PUBLIC SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg);
|
||||
|
||||
/**
|
||||
|
|
@ -526,7 +534,6 @@ LINPHONE_PUBLIC void linphone_proxy_config_set_custom_header(LinphoneProxyConfig
|
|||
**/
|
||||
LINPHONE_PUBLIC const LinphoneAuthInfo* linphone_proxy_config_find_auth_info(const LinphoneProxyConfig *cfg);
|
||||
|
||||
|
||||
/**
|
||||
* Get the persistent reference key associated to the proxy config.
|
||||
*
|
||||
|
|
@ -571,4 +578,8 @@ LINPHONE_PUBLIC void linphone_proxy_config_set_nat_policy(LinphoneProxyConfig *c
|
|||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,8 +16,15 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
#ifndef RINGPLAYER_H
|
||||
#define RINGPLAYER_H
|
||||
|
||||
#ifndef LINPHONE_RINGTONEPLAYER_H
|
||||
#define LINPHONE_RINGTONEPLAYER_H
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*LinphoneRingtonePlayerFunc)(LinphoneRingtonePlayer* rp, void* user_data, int status);
|
||||
|
||||
|
|
@ -41,4 +48,8 @@ LINPHONE_PUBLIC int linphone_ringtoneplayer_start_with_cb(MSFactory *factory, Li
|
|||
LINPHONE_PUBLIC bool_t linphone_ringtoneplayer_is_started(LinphoneRingtonePlayer* rp);
|
||||
LINPHONE_PUBLIC int linphone_ringtoneplayer_stop(LinphoneRingtonePlayer* rp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONE_RINGTONEPLAYER_H */
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONETUNNEL_H
|
||||
#define LINPHONETUNNEL_H
|
||||
#ifndef LINPHONE_TUNNEL_H_
|
||||
#define LINPHONE_TUNNEL_H_
|
||||
|
||||
#include "linphone/core.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -34,25 +34,25 @@
|
|||
* @{
|
||||
**/
|
||||
|
||||
/**
|
||||
* Linphone tunnel aims is to bypass IP traffic blocking due to aggressive firewalls which typically only authorize TCP traffic with destination port 443.
|
||||
* <br> Its principle is tunneling all SIP and/or RTP traffic through a single secure https connection up to a detunnelizer server.
|
||||
* <br> This set of methods enhance LinphoneCore functionalities in order to provide an easy to use API to
|
||||
* \li provision tunnel servers IP addresses and ports. This functionality is an option not implemented under GPL. Availability can be check at runtime using function #linphone_core_tunnel_available
|
||||
* \li start/stop the tunneling service
|
||||
* \li perform auto-detection whether tunneling is required, based on a test of sending/receiving a flow of UDP packets.
|
||||
*
|
||||
* It takes in charge automatically the SIP registration procedure when connecting or disconnecting to a tunnel server.
|
||||
* No other action on LinphoneCore is required to enable full operation in tunnel mode.
|
||||
*
|
||||
* <br> Provision is done using object #LinphoneTunnelConfig created by function #linphone_tunnel_config_new(). Functions #linphone_tunnel_config_set_host
|
||||
* and #linphone_tunnel_config_set_port allow to point to tunnel server IP/port. Once set, use function #linphone_tunnel_add_server to provision a tunnel server.
|
||||
* <br> Finally tunnel mode configuration is achieved by function #linphone_tunnel_set_mode.
|
||||
* <br> Tunnel connection status can be checked using function #linphone_tunnel_connected.
|
||||
*
|
||||
* Bellow pseudo code that can be use to configure, enable, check state and disable tunnel functionality:
|
||||
*
|
||||
* \code
|
||||
/**
|
||||
* Linphone tunnel aims is to bypass IP traffic blocking due to aggressive firewalls which typically only authorize TCP traffic with destination port 443.
|
||||
* <br> Its principle is tunneling all SIP and/or RTP traffic through a single secure https connection up to a detunnelizer server.
|
||||
* <br> This set of methods enhance LinphoneCore functionalities in order to provide an easy to use API to
|
||||
* \li provision tunnel servers IP addresses and ports. This functionality is an option not implemented under GPL. Availability can be check at runtime using function #linphone_core_tunnel_available
|
||||
* \li start/stop the tunneling service
|
||||
* \li perform auto-detection whether tunneling is required, based on a test of sending/receiving a flow of UDP packets.
|
||||
*
|
||||
* It takes in charge automatically the SIP registration procedure when connecting or disconnecting to a tunnel server.
|
||||
* No other action on LinphoneCore is required to enable full operation in tunnel mode.
|
||||
*
|
||||
* <br> Provision is done using object #LinphoneTunnelConfig created by function #linphone_tunnel_config_new(). Functions #linphone_tunnel_config_set_host
|
||||
* and #linphone_tunnel_config_set_port allow to point to tunnel server IP/port. Once set, use function #linphone_tunnel_add_server to provision a tunnel server.
|
||||
* <br> Finally tunnel mode configuration is achieved by function #linphone_tunnel_set_mode.
|
||||
* <br> Tunnel connection status can be checked using function #linphone_tunnel_connected.
|
||||
*
|
||||
* Bellow pseudo code that can be use to configure, enable, check state and disable tunnel functionality:
|
||||
*
|
||||
* \code
|
||||
LinphoneTunnel *tunnel = linphone_core_get_tunnel(linphone_core);
|
||||
LinphoneTunnelConfig *config=linphone_tunnel_config_new(); //instantiate tunnel configuration
|
||||
linphone_tunnel_config_set_host(config, "tunnel.linphone.org"); //set tunnel server host address
|
||||
|
|
@ -79,40 +79,13 @@
|
|||
linphone_call_unref(call); //release reference on the call
|
||||
|
||||
\endcode
|
||||
*
|
||||
* **/
|
||||
**/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef struct _LinphoneTunnelConfig LinphoneTunnelConfig;
|
||||
|
||||
/**
|
||||
* Enum describing the tunnel modes.
|
||||
**/
|
||||
typedef enum _LinphoneTunnelMode {
|
||||
LinphoneTunnelModeDisable, /**< The tunnel is disabled. */
|
||||
LinphoneTunnelModeEnable, /**< The tunnel is enabled. */
|
||||
LinphoneTunnelModeAuto /**< The tunnel is enabled automatically if it is required. */
|
||||
} LinphoneTunnelMode;
|
||||
|
||||
/**
|
||||
* Convert a string into LinphoneTunnelMode enum
|
||||
* @param string String to convert
|
||||
* @return An LinphoneTunnelMode enum. If the passed string is NULL or
|
||||
* does not match with any mode, the LinphoneTunnelModeDisable is returned.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneTunnelMode linphone_tunnel_mode_from_string(const char *string);
|
||||
|
||||
/**
|
||||
* Convert a tunnel mode enum into string
|
||||
* @param mode Enum to convert
|
||||
* @return "disable", "enable" or "auto"
|
||||
*/
|
||||
LINPHONE_PUBLIC const char *linphone_tunnel_mode_to_string(LinphoneTunnelMode mode);
|
||||
|
||||
/**
|
||||
* Create a new tunnel configuration
|
||||
*/
|
||||
|
|
@ -211,7 +184,6 @@ LINPHONE_PUBLIC int linphone_tunnel_config_get_delay(const LinphoneTunnelConfig
|
|||
**/
|
||||
LINPHONE_PUBLIC LinphoneTunnelConfig * linphone_tunnel_config_ref(LinphoneTunnelConfig *cfg);
|
||||
|
||||
|
||||
/**
|
||||
* Decrement the refcount of LinphoneTunnelConfig object.
|
||||
* @param cfg the LinphoneTunnelConfig object.
|
||||
|
|
@ -366,7 +338,6 @@ LINPHONE_PUBLIC void linphone_tunnel_get_http_proxy(LinphoneTunnel*tunnel,const
|
|||
*/
|
||||
LINPHONE_PUBLIC void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel*tunnel, const char* username,const char* passwd);
|
||||
|
||||
|
||||
/**
|
||||
* Sets whether tunneling of SIP and RTP is required.
|
||||
* @param tunnel object
|
||||
|
|
@ -413,5 +384,5 @@ LINPHONE_PUBLIC void linphone_tunnel_simulate_udp_loss(LinphoneTunnel *tunnel, b
|
|||
#endif
|
||||
|
||||
|
||||
#endif //LINPHONETUNNEL_H
|
||||
#endif /* LINPHONE_TUNNEL_H_ */
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef LINPHONE_VCARD_H
|
||||
#define LINPHONE_VCARD_H
|
||||
|
||||
#include <mediastreamer2/mscommon.h>
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
|
@ -32,11 +32,6 @@ extern "C"
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* The LinphoneVcard object.
|
||||
*/
|
||||
typedef struct _LinphoneVcard LinphoneVcard;
|
||||
|
||||
/**
|
||||
* Cast a belle_sip_object_t into LinphoneVcard.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef _WRAPPER_UTILS_H
|
||||
#define _WRAPPER_UTILS_H
|
||||
|
||||
#include "chat.h"
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_XMLRPC_H_
|
||||
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -31,39 +34,6 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enum describing the types of argument for LinphoneXmlRpcRequest.
|
||||
**/
|
||||
typedef enum _LinphoneXmlRpcArgType {
|
||||
LinphoneXmlRpcArgNone,
|
||||
LinphoneXmlRpcArgInt,
|
||||
LinphoneXmlRpcArgString
|
||||
} LinphoneXmlRpcArgType;
|
||||
|
||||
/**
|
||||
* Enum describing the status of a LinphoneXmlRpcRequest.
|
||||
**/
|
||||
typedef enum _LinphoneXmlRpcStatus {
|
||||
LinphoneXmlRpcStatusPending,
|
||||
LinphoneXmlRpcStatusOk,
|
||||
LinphoneXmlRpcStatusFailed
|
||||
} LinphoneXmlRpcStatus;
|
||||
|
||||
/**
|
||||
* The LinphoneXmlRpcRequest object representing a XML-RPC request to be sent.
|
||||
**/
|
||||
typedef struct _LinphoneXmlRpcRequest LinphoneXmlRpcRequest;
|
||||
|
||||
/**
|
||||
* An object to handle the callbacks for handling the LinphoneXmlRpcRequest operations.
|
||||
**/
|
||||
typedef struct _LinphoneXmlRpcRequestCbs LinphoneXmlRpcRequestCbs;
|
||||
|
||||
/**
|
||||
* The LinphoneXmlRpcSession object used to send XML-RPC requests and handle their responses.
|
||||
**/
|
||||
typedef struct _LinphoneXmlRpcSession LinphoneXmlRpcSession;
|
||||
|
||||
/**
|
||||
* Callback used to notify the response to an XML-RPC request.
|
||||
* @param[in] request LinphoneXmlRpcRequest object
|
||||
|
|
@ -163,7 +133,6 @@ LINPHONE_PUBLIC int linphone_xml_rpc_request_get_int_response(const LinphoneXmlR
|
|||
**/
|
||||
LINPHONE_PUBLIC const char * linphone_xml_rpc_request_get_string_response(const LinphoneXmlRpcRequest *request);
|
||||
|
||||
|
||||
/**
|
||||
* Create a new LinphoneXmlRpcSession object.
|
||||
* @param[in] core The LinphoneCore object used to send the XML-RPC requests.
|
||||
|
|
@ -207,14 +176,12 @@ LINPHONE_PUBLIC void linphone_xml_rpc_session_set_user_data(LinphoneXmlRpcSessio
|
|||
**/
|
||||
LINPHONE_PUBLIC void linphone_xml_rpc_session_send_request(LinphoneXmlRpcSession *session, LinphoneXmlRpcRequest *request);
|
||||
|
||||
|
||||
/**
|
||||
* Stop and unref an XML rpc session. Pending requests will be aborted.
|
||||
* @param[in] session LinphoneXmlRpcSession object.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_xml_rpc_session_release(LinphoneXmlRpcSession *session);
|
||||
|
||||
|
||||
/**
|
||||
* Acquire a reference to a LinphoneXmlRpcRequestCbs object.
|
||||
* @param[in] cbs LinphoneXmlRpcRequestCbs object.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue