agent.h | agent.h | |||
---|---|---|---|---|
skipping to change at line 64 | skipping to change at line 64 | |||
* connectivity checks to create a stream of data between you and your pee r. | * connectivity checks to create a stream of data between you and your pee r. | |||
* | * | |||
<example> | <example> | |||
<title>Simple example on how to use libnice</title> | <title>Simple example on how to use libnice</title> | |||
<programlisting> | <programlisting> | |||
guint stream_id; | guint stream_id; | |||
gchar buffer[] = "hello world!"; | gchar buffer[] = "hello world!"; | |||
GSList *lcands = NULL; | GSList *lcands = NULL; | |||
// Create a nice agent | // Create a nice agent | |||
NiceAgent *agent = nice_agent_new (NULL, NICE_COMPATIBILITY_DRAFT19); | NiceAgent *agent = nice_agent_new (NULL, NICE_COMPATIBILITY_RFC5245); | |||
// Connect the signals | // Connect the signals | |||
g_signal_connect (G_OBJECT (agent), "candidate-gathering-done", | g_signal_connect (G_OBJECT (agent), "candidate-gathering-done", | |||
G_CALLBACK (cb_candidate_gathering_done), NULL); | G_CALLBACK (cb_candidate_gathering_done), NULL); | |||
g_signal_connect (G_OBJECT (agent), "component-state-changed", | g_signal_connect (G_OBJECT (agent), "component-state-changed", | |||
G_CALLBACK (cb_component_state_changed), NULL); | G_CALLBACK (cb_component_state_changed), NULL); | |||
g_signal_connect (G_OBJECT (agent), "new-selected-pair", | g_signal_connect (G_OBJECT (agent), "new-selected-pair", | |||
G_CALLBACK (cb_new_selected_pair), NULL); | G_CALLBACK (cb_new_selected_pair), NULL); | |||
// Create a new stream with one component and start gathering candidates | // Create a new stream with one component and start gathering candidates | |||
skipping to change at line 205 | skipping to change at line 205 | |||
</example> | </example> | |||
*/ | */ | |||
typedef enum | typedef enum | |||
{ | { | |||
NICE_COMPONENT_TYPE_RTP = 1, | NICE_COMPONENT_TYPE_RTP = 1, | |||
NICE_COMPONENT_TYPE_RTCP = 2 | NICE_COMPONENT_TYPE_RTCP = 2 | |||
} NiceComponentType; | } NiceComponentType; | |||
/** | /** | |||
* NiceCompatibility: | * NiceCompatibility: | |||
* @NICE_COMPATIBILITY_DRAFT19: Use compatibility for ICE Draft 19 specs | * @NICE_COMPATIBILITY_RFC5245: Use compatibility with the RFC5245 ICE spec s | |||
* @NICE_COMPATIBILITY_GOOGLE: Use compatibility for Google Talk specs | * @NICE_COMPATIBILITY_GOOGLE: Use compatibility for Google Talk specs | |||
* @NICE_COMPATIBILITY_MSN: Use compatibility for MSN Messenger specs | * @NICE_COMPATIBILITY_MSN: Use compatibility for MSN Messenger specs | |||
* @NICE_COMPATIBILITY_WLM2009: Use compatibility with Windows Live Messeng er | * @NICE_COMPATIBILITY_WLM2009: Use compatibility with Windows Live Messeng er | |||
* 2009 | * 2009 | |||
* @NICE_COMPATIBILITY_DRAFT19: Use compatibility for ICE Draft 19 specs | ||||
* @NICE_COMPATIBILITY_LAST: Dummy last compatibility mode | * @NICE_COMPATIBILITY_LAST: Dummy last compatibility mode | |||
* | * | |||
* An enum to specify which compatible specifications the #NiceAgent should use. | * An enum to specify which compatible specifications the #NiceAgent should use. | |||
* Use with nice_agent_new() | * Use with nice_agent_new() | |||
* | ||||
* <warning>@NICE_COMPATIBILITY_DRAFT19 is deprecated and should not be use | ||||
d | ||||
* in newly-written code. It is kept for compatibility reasons and | ||||
* represents the same compatibility as @NICE_COMPATIBILITY_RFC5245 </warni | ||||
ng> | ||||
*/ | */ | |||
typedef enum | typedef enum | |||
{ | { | |||
NICE_COMPATIBILITY_DRAFT19 = 0, | NICE_COMPATIBILITY_RFC5245 = 0, | |||
NICE_COMPATIBILITY_GOOGLE, | NICE_COMPATIBILITY_GOOGLE, | |||
NICE_COMPATIBILITY_MSN, | NICE_COMPATIBILITY_MSN, | |||
NICE_COMPATIBILITY_WLM2009, | NICE_COMPATIBILITY_WLM2009, | |||
NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009 | NICE_COMPATIBILITY_DRAFT19 = NICE_COMPATIBILITY_RFC5245, | |||
NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009, | ||||
} NiceCompatibility; | } NiceCompatibility; | |||
/** | /** | |||
* NiceProxyType: | * NiceProxyType: | |||
* @NICE_PROXY_TYPE_NONE: Do not use a proxy | * @NICE_PROXY_TYPE_NONE: Do not use a proxy | |||
* @NICE_PROXY_TYPE_SOCKS5: Use a SOCKS5 proxy | * @NICE_PROXY_TYPE_SOCKS5: Use a SOCKS5 proxy | |||
* @NICE_PROXY_TYPE_HTTP: Use an HTTP proxy | * @NICE_PROXY_TYPE_HTTP: Use an HTTP proxy | |||
* @NICE_PROXY_TYPE_LAST: Dummy last proxy type | * @NICE_PROXY_TYPE_LAST: Dummy last proxy type | |||
* | * | |||
* An enum to specify which proxy type to use for relaying. | * An enum to specify which proxy type to use for relaying. | |||
skipping to change at line 659 | skipping to change at line 665 | |||
gint tos); | gint tos); | |||
/** | /** | |||
* nice_agent_set_software: | * nice_agent_set_software: | |||
* @agent: The #NiceAgent Object | * @agent: The #NiceAgent Object | |||
* @software: The value of the SOFTWARE attribute to add. | * @software: The value of the SOFTWARE attribute to add. | |||
* | * | |||
* This function will set the value of the SOFTWARE attribute to be added t o | * This function will set the value of the SOFTWARE attribute to be added t o | |||
* STUN requests, responses and error responses sent during connectivity ch ecks. | * STUN requests, responses and error responses sent during connectivity ch ecks. | |||
* <para> | * <para> | |||
* The SOFTWARE attribute will only be added in the #NICE_COMPATIBILITY_DRA FT19 | * The SOFTWARE attribute will only be added in the #NICE_COMPATIBILITY_RFC 5245 | |||
* and #NICE_COMPATIBILITY_WLM2009 compatibility modes. | * and #NICE_COMPATIBILITY_WLM2009 compatibility modes. | |||
* | * | |||
* </para> | * </para> | |||
* <note> | * <note> | |||
<para> | <para> | |||
The @software argument will be appended with the libnice version bef ore | The @software argument will be appended with the libnice version bef ore | |||
being sent. | being sent. | |||
</para> | </para> | |||
<para> | <para> | |||
The @software argument must be in UTF-8 encoding and only the first | The @software argument must be in UTF-8 encoding and only the first | |||
End of changes. 7 change blocks. | ||||
5 lines changed or deleted | 13 lines changed or added | |||
ice.h | ice.h | |||
---|---|---|---|---|
skipping to change at line 63 | skipping to change at line 63 | |||
*/ | */ | |||
# include "stun/stunagent.h" | # include "stun/stunagent.h" | |||
# ifdef __cplusplus | # ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
# endif | # endif | |||
/** | /** | |||
* StunUsageIceCompatibility: | * StunUsageIceCompatibility: | |||
* @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: The ICE compatibility with draft 19 | * @STUN_USAGE_ICE_COMPATIBILITY_RFC5245: The ICE compatibility with RFC 52 45 | |||
* @STUN_USAGE_ICE_COMPATIBILITY_GOOGLE: The ICE compatibility with Google' s | * @STUN_USAGE_ICE_COMPATIBILITY_GOOGLE: The ICE compatibility with Google' s | |||
* implementation of ICE | * implementation of ICE | |||
* @STUN_USAGE_ICE_COMPATIBILITY_MSN: The ICE compatibility with MSN's | * @STUN_USAGE_ICE_COMPATIBILITY_MSN: The ICE compatibility with MSN's | |||
* implementation of ICE | * implementation of ICE | |||
* @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: The ICE compatibility with draft 19 | ||||
* | * | |||
* This enum defines which compatibility modes this ICE usage can use | * This enum defines which compatibility modes this ICE usage can use | |||
* | ||||
* <warning>@STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 is deprecated and should | ||||
not | ||||
* be used in newly-written code. It is kept for compatibility reasons and | ||||
* represents the same compatibility as @STUN_USAGE_ICE_COMPATIBILITY_RFC52 | ||||
45 | ||||
* </warning> | ||||
*/ | */ | |||
typedef enum { | typedef enum { | |||
STUN_USAGE_ICE_COMPATIBILITY_DRAFT19, | STUN_USAGE_ICE_COMPATIBILITY_RFC5245, | |||
STUN_USAGE_ICE_COMPATIBILITY_GOOGLE, | STUN_USAGE_ICE_COMPATIBILITY_GOOGLE, | |||
STUN_USAGE_ICE_COMPATIBILITY_MSN, | STUN_USAGE_ICE_COMPATIBILITY_MSN, | |||
STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 = STUN_USAGE_ICE_COMPATIBILITY_RFC52 45, | ||||
} StunUsageIceCompatibility; | } StunUsageIceCompatibility; | |||
/** | /** | |||
* StunUsageIceReturn: | * StunUsageIceReturn: | |||
* @STUN_USAGE_ICE_RETURN_SUCCESS: The function succeeded | * @STUN_USAGE_ICE_RETURN_SUCCESS: The function succeeded | |||
* @STUN_USAGE_ICE_RETURN_ERROR: There was an unspecified error | * @STUN_USAGE_ICE_RETURN_ERROR: There was an unspecified error | |||
* @STUN_USAGE_ICE_RETURN_INVALID: The message is invalid for processing | * @STUN_USAGE_ICE_RETURN_INVALID: The message is invalid for processing | |||
* @STUN_USAGE_ICE_RETURN_ROLE_CONFLICT: A role conflict was detected | * @STUN_USAGE_ICE_RETURN_ROLE_CONFLICT: A role conflict was detected | |||
* @STUN_USAGE_ICE_RETURN_INVALID_REQUEST: The message is an not a request | * @STUN_USAGE_ICE_RETURN_INVALID_REQUEST: The message is an not a request | |||
* @STUN_USAGE_ICE_RETURN_INVALID_METHOD: The method of the request is inva lid | * @STUN_USAGE_ICE_RETURN_INVALID_METHOD: The method of the request is inva lid | |||
skipping to change at line 128 | skipping to change at line 135 | |||
* @cand_use: Set to %TRUE to append the USE-CANDIDATE flag to the request | * @cand_use: Set to %TRUE to append the USE-CANDIDATE flag to the request | |||
* @controlling: Set to %TRUE if you are the controlling agent or set to | * @controlling: Set to %TRUE if you are the controlling agent or set to | |||
* %FALSE if you are the controlled agent. | * %FALSE if you are the controlled agent. | |||
* @priority: The value of the PRIORITY attribute | * @priority: The value of the PRIORITY attribute | |||
* @tie: The value of the tie-breaker to put in the ICE-CONTROLLED or | * @tie: The value of the tie-breaker to put in the ICE-CONTROLLED or | |||
* ICE-CONTROLLING attribute | * ICE-CONTROLLING attribute | |||
* @compatibility: The compatibility mode to use for building the conncheck | * @compatibility: The compatibility mode to use for building the conncheck | |||
* request | * request | |||
* | * | |||
* Builds an ICE connectivity check STUN message. | * Builds an ICE connectivity check STUN message. | |||
* If the compatibility is not #STUN_USAGE_ICE_COMPATIBILITY_DRAFT19, the | * If the compatibility is not #STUN_USAGE_ICE_COMPATIBILITY_RFC5245, the | |||
* @cand_use, @controlling, @priority and @tie arguments are not used. | * @cand_use, @controlling, @priority and @tie arguments are not used. | |||
* Returns: The length of the message built. | * Returns: The length of the message built. | |||
*/ | */ | |||
size_t | size_t | |||
stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg, | stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg, | |||
uint8_t *buffer, size_t buffer_len, | uint8_t *buffer, size_t buffer_len, | |||
const uint8_t *username, const size_t username_len, | const uint8_t *username, const size_t username_len, | |||
const uint8_t *password, const size_t password_len, | const uint8_t *password, const size_t password_len, | |||
bool cand_use, bool controlling, uint32_t priority, | bool cand_use, bool controlling, uint32_t priority, | |||
uint64_t tie, StunUsageIceCompatibility compatibility); | uint64_t tie, StunUsageIceCompatibility compatibility); | |||
End of changes. 6 change blocks. | ||||
3 lines changed or deleted | 12 lines changed or added | |||