diff --git a/coreapi/call_params.c b/coreapi/call_params.c index be876da12..a48066169 100644 --- a/coreapi/call_params.c +++ b/coreapi/call_params.c @@ -80,6 +80,10 @@ LinphoneMediaEncryption linphone_call_params_get_media_encryption(const Linphone return cp->media_encryption; } +LinphonePrivacyMask linphone_call_params_get_privacy(const LinphoneCallParams *params) { + return params->privacy; +} + float linphone_call_params_get_received_framerate(const LinphoneCallParams *cp){ return cp->received_fps; } @@ -128,6 +132,10 @@ void linphone_call_params_set_media_encryption(LinphoneCallParams *cp, LinphoneM cp->media_encryption = e; } +void linphone_call_params_set_privacy(LinphoneCallParams *params, LinphonePrivacyMask privacy) { + params->privacy=privacy; +} + void linphone_call_params_set_record_file(LinphoneCallParams *cp, const char *path){ if (cp->record_file){ ms_free(cp->record_file); @@ -149,27 +157,6 @@ bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp){ } -/** - * @ingroup call_control - * Set requested level of privacy for the call. - * \xmlonly javascript \endxmlonly - * @param params the call parameters to be modified - * @param privacy LinphonePrivacy to configure privacy - * */ -void linphone_call_params_set_privacy(LinphoneCallParams *params, LinphonePrivacyMask privacy) { - params->privacy=privacy; -} - -/** - * @ingroup call_control - * Get requested level of privacy for the call. - * @param params the call parameters - * @return Privacy mode - * */ -LinphonePrivacyMask linphone_call_params_get_privacy(const LinphoneCallParams *params) { - return params->privacy; -} - /******************************************************************************* * Reference and user data handling functions * diff --git a/coreapi/call_params.h b/coreapi/call_params.h index b06677956..9c942826b 100644 --- a/coreapi/call_params.h +++ b/coreapi/call_params.h @@ -116,6 +116,13 @@ LINPHONE_PUBLIC bool_t linphone_call_params_get_local_conference_mode(const Linp **/ LINPHONE_PUBLIC LinphoneMediaEncryption linphone_call_params_get_media_encryption(const LinphoneCallParams *cp); +/** + * Get requested level of privacy for the call. + * @param[in] cp LinphoneCallParams object + * @return The privacy mode used for the call. +**/ +LINPHONE_PUBLIC LinphonePrivacyMask linphone_call_params_get_privacy(const LinphoneCallParams *cp); + /** * Get the framerate of the video that is received. * @param[in] cp LinphoneCallParams object @@ -206,6 +213,14 @@ LINPHONE_PUBLIC void linphone_call_params_set_audio_bandwidth_limit(LinphoneCall **/ LINPHONE_PUBLIC void linphone_call_params_set_media_encryption(LinphoneCallParams *cp, LinphoneMediaEncryption enc); +/** + * Set requested level of privacy for the call. + * \xmlonly javascript \endxmlonly + * @param[in] cp LinphoneCallParams object + * @param[in] privacy The privacy mode to used for the call. +**/ +LINPHONE_PUBLIC void linphone_call_params_set_privacy(LinphoneCallParams *params, LinphonePrivacyMask privacy); + /** * Enable recording of the call. * This function must be used before the call parameters are assigned to the call. diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index b0a66b75a..bd9386ae7 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -310,53 +310,6 @@ LINPHONE_PUBLIC const char *linphone_media_encryption_to_string(LinphoneMediaEnc **/ -#ifdef IN_LINPHONE -#include "linphonefriend.h" -#include "event.h" -#include "call_log.h" -#include "call_params.h" -#else -#include "linphone/linphonefriend.h" -#include "linphone/event.h" -#include "linphone/call_log.h" -#include "linphone/call_params.h" -#endif - -LINPHONE_PUBLIC LinphoneAddress * linphone_address_new(const char *addr); -LINPHONE_PUBLIC LinphoneAddress * linphone_address_clone(const LinphoneAddress *addr); -LINPHONE_PUBLIC LinphoneAddress * linphone_address_ref(LinphoneAddress *addr); -LINPHONE_PUBLIC void linphone_address_unref(LinphoneAddress *addr); -LINPHONE_PUBLIC const char *linphone_address_get_scheme(const LinphoneAddress *u); -LINPHONE_PUBLIC const char *linphone_address_get_display_name(const LinphoneAddress* u); -LINPHONE_PUBLIC const char *linphone_address_get_username(const LinphoneAddress *u); -LINPHONE_PUBLIC const char *linphone_address_get_domain(const LinphoneAddress *u); -LINPHONE_PUBLIC int linphone_address_get_port(const LinphoneAddress *u); -LINPHONE_PUBLIC void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name); -LINPHONE_PUBLIC void linphone_address_set_username(LinphoneAddress *uri, const char *username); -LINPHONE_PUBLIC void linphone_address_set_domain(LinphoneAddress *uri, const char *host); -LINPHONE_PUBLIC void linphone_address_set_port(LinphoneAddress *uri, int port); -/*remove tags, params etc... so that it is displayable to the user*/ -LINPHONE_PUBLIC void linphone_address_clean(LinphoneAddress *uri); -LINPHONE_PUBLIC bool_t linphone_address_is_secure(const LinphoneAddress *uri); -LINPHONE_PUBLIC LinphoneTransportType linphone_address_get_transport(const LinphoneAddress *uri); -LINPHONE_PUBLIC void linphone_address_set_transport(LinphoneAddress *uri,LinphoneTransportType type); -LINPHONE_PUBLIC char *linphone_address_as_string(const LinphoneAddress *u); -LINPHONE_PUBLIC char *linphone_address_as_string_uri_only(const LinphoneAddress *u); -LINPHONE_PUBLIC bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2); -LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u); - -/** - * Create a #LinphoneAddress object by parsing the user supplied address, given as a string. - * @param[in] lc #LinphoneCore object - * @param[in] address String containing the user supplied address - * @return The create #LinphoneAddress object - * @ingroup linphone_address - */ -LINPHONE_PUBLIC LinphoneAddress * linphone_core_create_address(LinphoneCore *lc, const char *address); - -struct _SipSetupContext; - - /* * Note for developers: this enum must be kept synchronized with the SalPrivacy enum declared in sal.h */ @@ -415,8 +368,53 @@ typedef unsigned int LinphonePrivacyMask; LINPHONE_PUBLIC const char* linphone_privacy_to_string(LinphonePrivacy privacy); -LINPHONE_PUBLIC void linphone_call_params_set_privacy(LinphoneCallParams *params, LinphonePrivacyMask privacy); -LINPHONE_PUBLIC LinphonePrivacyMask linphone_call_params_get_privacy(const LinphoneCallParams *params); + + +#ifdef IN_LINPHONE +#include "linphonefriend.h" +#include "event.h" +#include "call_log.h" +#include "call_params.h" +#else +#include "linphone/linphonefriend.h" +#include "linphone/event.h" +#include "linphone/call_log.h" +#include "linphone/call_params.h" +#endif + +LINPHONE_PUBLIC LinphoneAddress * linphone_address_new(const char *addr); +LINPHONE_PUBLIC LinphoneAddress * linphone_address_clone(const LinphoneAddress *addr); +LINPHONE_PUBLIC LinphoneAddress * linphone_address_ref(LinphoneAddress *addr); +LINPHONE_PUBLIC void linphone_address_unref(LinphoneAddress *addr); +LINPHONE_PUBLIC const char *linphone_address_get_scheme(const LinphoneAddress *u); +LINPHONE_PUBLIC const char *linphone_address_get_display_name(const LinphoneAddress* u); +LINPHONE_PUBLIC const char *linphone_address_get_username(const LinphoneAddress *u); +LINPHONE_PUBLIC const char *linphone_address_get_domain(const LinphoneAddress *u); +LINPHONE_PUBLIC int linphone_address_get_port(const LinphoneAddress *u); +LINPHONE_PUBLIC void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name); +LINPHONE_PUBLIC void linphone_address_set_username(LinphoneAddress *uri, const char *username); +LINPHONE_PUBLIC void linphone_address_set_domain(LinphoneAddress *uri, const char *host); +LINPHONE_PUBLIC void linphone_address_set_port(LinphoneAddress *uri, int port); +/*remove tags, params etc... so that it is displayable to the user*/ +LINPHONE_PUBLIC void linphone_address_clean(LinphoneAddress *uri); +LINPHONE_PUBLIC bool_t linphone_address_is_secure(const LinphoneAddress *uri); +LINPHONE_PUBLIC LinphoneTransportType linphone_address_get_transport(const LinphoneAddress *uri); +LINPHONE_PUBLIC void linphone_address_set_transport(LinphoneAddress *uri,LinphoneTransportType type); +LINPHONE_PUBLIC char *linphone_address_as_string(const LinphoneAddress *u); +LINPHONE_PUBLIC char *linphone_address_as_string_uri_only(const LinphoneAddress *u); +LINPHONE_PUBLIC bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2); +LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u); + +/** + * Create a #LinphoneAddress object by parsing the user supplied address, given as a string. + * @param[in] lc #LinphoneCore object + * @param[in] address String containing the user supplied address + * @return The create #LinphoneAddress object + * @ingroup linphone_address + */ +LINPHONE_PUBLIC LinphoneAddress * linphone_core_create_address(LinphoneCore *lc, const char *address); + +struct _SipSetupContext; struct _LinphoneInfoMessage;