Ignore:
Timestamp:
Mar 28, 2007 4:24:00 PM (17 years ago)
Author:
bennylp
Message:

Fixed pjnath build warnings/errors on Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h

    r1111 r1112  
    2323/** 
    2424 * @file transport_ice.h 
    25  * @brief Stream transport with ICE. 
     25 * @brief ICE capable media transport. 
    2626 */ 
    2727 
     
    3131 
    3232/** 
    33  * @defgroup PJMEDIA_TRANSPORT_ICE ICE Socket Transport 
    34  * @ingroup PJMEDIA_TRANSPORT_H 
     33 * @defgroup PJMEDIA_TRANSPORT_ICE ICE Capable media transport  
     34 * @ingroup PJMEDIA_TRANSPORT 
    3535 * @brief Implementation of media transport with ICE. 
    3636 * @{ 
     
    4040 
    4141 
     42/** 
     43 * Create the media transport. 
     44 * 
     45 * @param endpt         The media endpoint. 
     46 * @param name          Optional name to identify this ICE media transport 
     47 *                      for logging purposes. 
     48 * @param comp_cnt      Number of components to be created. 
     49 * @param stun_cfg      Pointer to STUN configuration settings. 
     50 * @param p_tp          Pointer to receive the media transport instance. 
     51 * 
     52 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     53 */ 
    4254PJ_DECL(pj_status_t) pjmedia_ice_create(pjmedia_endpt *endpt, 
    4355                                        const char *name, 
     
    4557                                        pj_stun_config *stun_cfg, 
    4658                                        pjmedia_transport **p_tp); 
     59 
     60/** 
     61 * Destroy the media transport. 
     62 * 
     63 * @param tp            The media transport. 
     64 * 
     65 * @return              PJ_SUCCESS. 
     66 */ 
    4767PJ_DECL(pj_status_t) pjmedia_ice_destroy(pjmedia_transport *tp); 
    4868 
     69 
     70/** 
     71 * Start the initialization process of this media transport. This function 
     72 * will gather the transport addresses to be registered to ICE session as 
     73 * candidates. If STUN is configured, this will start the STUN Binding or 
     74 * Allocate request to get the STUN server reflexive or relayed address. 
     75 * This function will return immediately, and application should poll the 
     76 * STUN completion status by calling #pjmedia_ice_get_init_status(). 
     77 * 
     78 * @param tp            The media transport. 
     79 * @param options       Options, see pj_ice_strans_option in PJNATH  
     80 *                      documentation. 
     81 * @param start_addr    Local address where socket will be bound to. This 
     82 *                      address will be used as follows: 
     83 *                      - if the value is NULL, then socket will be bound 
     84 *                        to any available port. 
     85 *                      - if the value is not NULL, then if the port number 
     86 *                        is not zero, it will used as the starting port  
     87 *                        where the socket will be bound to. If bind() to 
     88 *                        this port fails, this function will try to bind 
     89 *                        to port+2, repeatedly until it succeeded. 
     90 *                        If application doesn't want this function to  
     91 *                        retry binding the socket to other port, it can 
     92 *                        specify PJ_ICE_ST_OPT_NO_PORT_RETRY option. 
     93 *                      - if the value is not NULL, then if the address 
     94 *                        is not INADDR_ANY, this function will bind the 
     95 *                        socket to this particular interface only, and 
     96 *                        no other host candidates will be added for this 
     97 *                        socket. 
     98 * @param stun_srv      Address of the STUN server, or NULL if STUN server 
     99 *                      reflexive mapping is not to be used. 
     100 * @param turn_srv      Address of the TURN server, or NULL if TURN relay 
     101 *                      is not to be used. 
     102 * 
     103 * @return              PJ_SUCCESS when the initialization process has started 
     104 *                      successfully, or the appropriate error code. 
     105 */ 
    49106PJ_DECL(pj_status_t) pjmedia_ice_start_init(pjmedia_transport *tp, 
    50107                                            unsigned options, 
     
    52109                                            const pj_sockaddr_in *stun_srv, 
    53110                                            const pj_sockaddr_in *turn_srv); 
     111 
     112/** 
     113 * Poll the initialization status of this media transport. 
     114 * 
     115 * @param tp            The media transport. 
     116 * 
     117 * @return              PJ_SUCCESS if all candidates have been resolved 
     118 *                      successfully, PJ_EPENDING if transport resolution 
     119 *                      is still in progress, or other status on failure. 
     120 */ 
    54121PJ_DECL(pj_status_t) pjmedia_ice_get_init_status(pjmedia_transport *tp); 
    55122 
     123 
     124/** 
     125 * Get the ICE stream transport component for the specified component ID. 
     126 * 
     127 * @param tp            The media transport. 
     128 * @param comp_id       The component ID. 
     129 * @param comp          The structure which will be filled with the 
     130 *                      component. 
     131 * 
     132 * @return              PJ_SUCCESS or the appropriate error code. 
     133 */ 
    56134PJ_DECL(pj_status_t) pjmedia_ice_get_comp(pjmedia_transport *tp, 
    57135                                          unsigned comp_id, 
    58136                                          pj_ice_strans_comp *comp); 
    59137 
     138/** 
     139 * Initialize the ICE session. 
     140 * 
     141 * @param tp            The media transport. 
     142 * @param role          ICE role. 
     143 * @param local_ufrag   Optional local username fragment. 
     144 * @param local_passwd  Optional local password. 
     145 * 
     146 * @return              PJ_SUCCESS, or the appropriate error code. 
     147 
     148 */ 
    60149PJ_DECL(pj_status_t) pjmedia_ice_init_ice(pjmedia_transport *tp, 
    61150                                          pj_ice_sess_role role, 
    62151                                          const pj_str_t *local_ufrag, 
    63152                                          const pj_str_t *local_passwd); 
     153 
     154/** 
     155 * Modify the SDP to add ICE specific SDP attributes before sending 
     156 * the SDP to remote host. 
     157 * 
     158 * @param tp            The media transport. 
     159 * @param pool          Pool to allocate memory for the SDP elements. 
     160 * @param sdp           The SDP descriptor to be modified. 
     161 * 
     162 * @return              PJ_SUCCESS, or the appropriate error code. 
     163 */ 
    64164PJ_DECL(pj_status_t) pjmedia_ice_modify_sdp(pjmedia_transport *tp, 
    65165                                            pj_pool_t *pool, 
    66166                                            pjmedia_sdp_session *sdp); 
     167 
     168/** 
     169 * Start ICE connectivity checks. 
     170 * 
     171 * This function will pair the local and remote candidates to create  
     172 * check list. Once the check list is created and sorted based on the 
     173 * priority, ICE periodic checks will be started. This function will  
     174 * return immediately, and application will be notified about the  
     175 * connectivity check status in the callback. 
     176 * 
     177 * @param tp            The media transport. 
     178 * @param pool          Memory pool to parse the SDP. 
     179 * @param rem_sdp       The SDP received from remote agent. 
     180 * @param media_index   The media index (in SDP) to process. 
     181 * 
     182 * @return              PJ_SUCCESS, or the appropriate error code. 
     183 */ 
    67184PJ_DECL(pj_status_t) pjmedia_ice_start_ice(pjmedia_transport *tp, 
    68185                                           pj_pool_t *pool, 
    69                                            pjmedia_sdp_session *rem_sdp, 
     186                                           const pjmedia_sdp_session *rem_sdp, 
    70187                                           unsigned media_index); 
     188 
     189/** 
     190 * Stop the ICE session (typically when the call is terminated). Application 
     191 * may restart the ICE session again by calling #pjmedia_ice_init_ice(), 
     192 * for example to use this media transport for the next call. 
     193 * 
     194 * @param tp            The media transport. 
     195 * 
     196 * @return              PJ_SUCCESS, or the appropriate error code. 
     197 */ 
    71198PJ_DECL(pj_status_t) pjmedia_ice_stop_ice(pjmedia_transport *tp); 
    72199 
Note: See TracChangeset for help on using the changeset viewer.