Ignore:
Timestamp:
Jul 28, 2007 2:44:55 AM (15 years ago)
Author:
bennylp
Message:

Continue work on ticket #354: changed pjlib-util and pjnath libraries to .DSO (DLL) in Symbian

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/sock.h

    r1405 r1410  
    6060 * THE LIBRARY WILL DO TRANSLATION TO THE NATIVE VALUE. 
    6161 */ 
    62 extern const pj_uint16_t PJ_AF_UNIX; /**< Unix domain socket.   */ 
    63 #define PJ_AF_LOCAL      PJ_AF_UNIX; /**< POSIX name for AF_UNIX        */ 
    64 extern const pj_uint16_t PJ_AF_INET; /**< Internet IP protocol. */ 
    65 extern const pj_uint16_t PJ_AF_INET6;/**< IP version 6.         */ 
    66 extern const pj_uint16_t PJ_AF_PACKET;/**< Packet family.       */ 
    67 extern const pj_uint16_t PJ_AF_IRDA; /**< IRDA sockets.         */ 
    68  
     62 
     63/** Unix domain socket. @see pj_AF_UNIX() */ 
     64extern const pj_uint16_t PJ_AF_UNIX; 
     65 
     66/** POSIX name for AF_UNIX      */ 
     67#define PJ_AF_LOCAL      PJ_AF_UNIX; 
     68 
     69/** Internet IP protocol. @see pj_AF_INET() */ 
     70extern const pj_uint16_t PJ_AF_INET; 
     71 
     72/** IP version 6. @see pj_AF_INET6() */ 
     73extern const pj_uint16_t PJ_AF_INET6; 
     74 
     75/** Packet family. @see pj_AF_PACKET() */ 
     76extern const pj_uint16_t PJ_AF_PACKET; 
     77 
     78/** IRDA sockets. @see pj_AF_IRDA() */ 
     79extern const pj_uint16_t PJ_AF_IRDA; 
     80 
     81/* 
     82 * Accessor functions for various address family constants. These 
     83 * functions are provided because Symbian doesn't allow exporting 
     84 * global variables from a DLL. 
     85 */ 
     86 
     87/** Get #PJ_AF_UNIX value. */ 
    6988PJ_DECL(pj_uint16_t) pj_AF_UNIX(void); 
     89/** Get #PJ_AF_INET value. */ 
    7090PJ_DECL(pj_uint16_t) pj_AF_INET(void); 
     91/** Get #PJ_AF_INET6 value. */ 
    7192PJ_DECL(pj_uint16_t) pj_AF_INET6(void); 
     93/** Get #PJ_AF_PACKET value. */ 
    7294PJ_DECL(pj_uint16_t) pj_AF_PACKET(void); 
     95/** Get #PJ_AF_IRDA value. */ 
    7396PJ_DECL(pj_uint16_t) pj_AF_IRDA(void); 
    7497 
     
    80103 */ 
    81104 
    82 extern const pj_uint16_t PJ_SOCK_STREAM; /**< Sequenced, reliable, connection- 
    83                                              based byte streams.           */ 
    84 extern const pj_uint16_t PJ_SOCK_DGRAM;  /**< Connectionless, unreliable  
    85                                              datagrams of fixed maximum  
    86                                              lengths.                      */ 
    87 extern const pj_uint16_t PJ_SOCK_RAW;    /**< Raw protocol interface.       */ 
    88 extern const pj_uint16_t PJ_SOCK_RDM;    /**< Reliably-delivered messages.  */ 
    89  
    90  
     105/** Sequenced, reliable, connection-based byte streams. 
     106 *  @see pj_SOCK_STREAM() */ 
     107extern const pj_uint16_t PJ_SOCK_STREAM; 
     108 
     109/** Connectionless, unreliable datagrams of fixed maximum lengths. 
     110 *  @see pj_SOCK_DGRAM() */ 
     111extern const pj_uint16_t PJ_SOCK_DGRAM; 
     112 
     113/** Raw protocol interface. @see pj_SOCK_RAW() */ 
     114extern const pj_uint16_t PJ_SOCK_RAW; 
     115 
     116/** Reliably-delivered messages.  @see pj_SOCK_RDM() */ 
     117extern const pj_uint16_t PJ_SOCK_RDM; 
     118 
     119 
     120/* 
     121 * Accessor functions for various constants. These functions are provided 
     122 * because Symbian doesn't allow exporting global variables from a DLL. 
     123 */ 
     124 
     125/** Get #PJ_SOCK_STREAM constant */ 
    91126PJ_DECL(int) pj_SOCK_STREAM(void); 
     127/** Get #PJ_SOCK_DGRAM constant */ 
    92128PJ_DECL(int) pj_SOCK_DGRAM(void); 
     129/** Get #PJ_SOCK_RAW constant */ 
    93130PJ_DECL(int) pj_SOCK_RAW(void); 
     131/** Get #PJ_SOCK_RDM constant */ 
    94132PJ_DECL(int) pj_SOCK_RDM(void); 
    95133 
     
    100138 * THE LIBRARY WILL TRANSLATE THE VALUE TO THE NATIVE VALUE. 
    101139 */ 
    102 extern const pj_uint16_t PJ_SOL_SOCKET; /**< Socket level.  */ 
    103 extern const pj_uint16_t PJ_SOL_IP;     /**< IP level.      */ 
    104 extern const pj_uint16_t PJ_SOL_TCP;    /**< TCP level.     */ 
    105 extern const pj_uint16_t PJ_SOL_UDP;    /**< UDP level.     */ 
    106 extern const pj_uint16_t PJ_SOL_IPV6;   /**< IP version 6   */ 
    107  
     140/** Socket level. @see pj_SOL_SOCKET() */ 
     141extern const pj_uint16_t PJ_SOL_SOCKET; 
     142/** IP level. @see pj_SOL_IP() */ 
     143extern const pj_uint16_t PJ_SOL_IP; 
     144/** TCP level. @see pj_SOL_TCP() */ 
     145extern const pj_uint16_t PJ_SOL_TCP; 
     146/** UDP level. @see pj_SOL_UDP() */ 
     147extern const pj_uint16_t PJ_SOL_UDP; 
     148/** IP version 6. @see pj_SOL_IPV6() */ 
     149extern const pj_uint16_t PJ_SOL_IPV6; 
     150 
     151/* 
     152 * Accessor functions for various constants. These functions are provided 
     153 * because Symbian doesn't allow exporting global variables from a DLL. 
     154 */ 
     155 
     156/** Get #PJ_SOL_SOCKET constant */ 
    108157PJ_DECL(pj_uint16_t) pj_SOL_SOCKET(void); 
     158/** Get #PJ_SOL_IP constant */ 
    109159PJ_DECL(pj_uint16_t) pj_SOL_IP(void); 
     160/** Get #PJ_SOL_TCP constant */ 
    110161PJ_DECL(pj_uint16_t) pj_SOL_TCP(void); 
     162/** Get #PJ_SOL_UDP constant */ 
    111163PJ_DECL(pj_uint16_t) pj_SOL_UDP(void); 
     164/** Get #PJ_SOL_IPV6 constant */ 
    112165PJ_DECL(pj_uint16_t) pj_SOL_IPV6(void); 
    113166 
     
    119172 *  See http://support.microsoft.com/kb/248611 
    120173 */ 
    121 extern const pj_uint16_t PJ_IP_TOS;     /**< IP_TOS optname in setsockopt() */ 
    122  
     174/** IP_TOS optname in setsockopt(). @see pj_IP_TOS() */ 
     175extern const pj_uint16_t PJ_IP_TOS; 
     176 
     177/** Get #PJ_IP_TOS constant */ 
    123178PJ_DECL(int) pj_IP_TOS(void); 
    124179 
     
    130185 *  See http://support.microsoft.com/kb/248611 
    131186 */ 
    132 extern const pj_uint16_t PJ_IPTOS_LOWDELAY;     /**< Minimize  delays       */ 
    133 extern const pj_uint16_t PJ_IPTOS_THROUGHPUT;   /**< Optimize throughput    */ 
    134 extern const pj_uint16_t PJ_IPTOS_RELIABILITY;  /**< Optimize for reliability*/ 
    135 extern const pj_uint16_t PJ_IPTOS_MINCOST;      /**< "filler data" where slow  
    136                                                   transmission does't matter */ 
    137  
     187/** Minimize delays. @see pj_IPTOS_LOWDELAY() */ 
     188extern const pj_uint16_t PJ_IPTOS_LOWDELAY; 
     189 
     190/** Optimize throughput. @see pj_IPTOS_THROUGHPUT() */ 
     191extern const pj_uint16_t PJ_IPTOS_THROUGHPUT; 
     192 
     193/** Optimize for reliability. @see pj_IPTOS_RELIABILITY() */ 
     194extern const pj_uint16_t PJ_IPTOS_RELIABILITY; 
     195 
     196/** "filler data" where slow transmission does't matter. 
     197 *  @see pj_IPTOS_MINCOST() */ 
     198extern const pj_uint16_t PJ_IPTOS_MINCOST; 
     199 
     200 
     201/** Get #PJ_IPTOS_LOWDELAY constant */ 
    138202PJ_DECL(int) pj_IPTOS_LOWDELAY(void); 
     203 
     204/** Get #PJ_IPTOS_THROUGHPUT constant */ 
    139205PJ_DECL(int) pj_IPTOS_THROUGHPUT(void); 
     206 
     207/** Get #PJ_IPTOS_RELIABILITY constant */ 
    140208PJ_DECL(int) pj_IPTOS_RELIABILITY(void); 
     209 
     210/** Get #PJ_IPTOS_MINCOST constant */ 
    141211PJ_DECL(int) pj_IPTOS_MINCOST(void); 
    142212 
     
    146216 * or #pj_sock_getsockopt(). 
    147217 */ 
    148 extern const pj_uint16_t PJ_SO_TYPE;  /**< Socket type.             */ 
    149 extern const pj_uint16_t PJ_SO_RCVBUF;/**< Buffer size for receive. */ 
    150 extern const pj_uint16_t PJ_SO_SNDBUF;/**< Buffer size for send.    */ 
    151  
     218 
     219/** Socket type. @see pj_SO_TYPE() */ 
     220extern const pj_uint16_t PJ_SO_TYPE; 
     221 
     222/** Buffer size for receive. @see pj_SO_RCVBUF() */ 
     223extern const pj_uint16_t PJ_SO_RCVBUF; 
     224 
     225/** Buffer size for send. @see pj_SO_SNDBUF() */ 
     226extern const pj_uint16_t PJ_SO_SNDBUF; 
     227 
     228 
     229/** Get #PJ_SO_TYPE constant */ 
    152230PJ_DECL(pj_uint16_t) pj_SO_TYPE(void); 
     231 
     232/** Get #PJ_SO_RCVBUF constant */ 
    153233PJ_DECL(pj_uint16_t) pj_SO_RCVBUF(void); 
     234 
     235/** Get #PJ_SO_SNDBUF constant */ 
    154236PJ_DECL(pj_uint16_t) pj_SO_SNDBUF(void); 
    155237 
     
    158240 * Flags to be specified in #pj_sock_recv, #pj_sock_send, etc. 
    159241 */ 
    160 extern const int PJ_MSG_OOB;      /**< Out-of-band messages.         */ 
    161 extern const int PJ_MSG_PEEK;     /**< Peek, don't remove from buffer*/ 
    162 extern const int PJ_MSG_DONTROUTE;/**< Don't route.                  */ 
    163  
     242 
     243/** Out-of-band messages. @see pj_MSG_OOB() */ 
     244extern const int PJ_MSG_OOB; 
     245 
     246/** Peek, don't remove from buffer. @see pj_MSG_PEEK() */ 
     247extern const int PJ_MSG_PEEK; 
     248 
     249/** Don't route. @see pj_MSG_DONTROUTE() */ 
     250extern const int PJ_MSG_DONTROUTE; 
     251 
     252 
     253/** Get #PJ_MSG_OOB constant */ 
    164254PJ_DECL(int) pj_MSG_OOB(void); 
     255 
     256/** Get #PJ_MSG_PEEK constant */ 
    165257PJ_DECL(int) pj_MSG_PEEK(void); 
     258 
     259/** Get #PJ_MSG_DONTROUTE constant */ 
    166260PJ_DECL(int) pj_MSG_DONTROUTE(void); 
    167261 
    168262 
    169263/** 
    170  * Flag to be specified in #pj_sock_shutdown. 
     264 * Flag to be specified in #pj_sock_shutdown(). 
    171265 */ 
    172266typedef enum pj_socket_sd_type 
     
    712806 * @param len           On input, the length of the buffer. On return, 
    713807 *                      contains the length of data received. 
    714  * @param flags         Combination of #pj_sock_msg_flag. 
     808 * @param flags         Flags (such as pj_MSG_PEEK()). 
    715809 * 
    716810 * @return              PJ_SUCCESS or the error code. 
     
    728822 * @param len           On input, the length of the buffer. On return, 
    729823 *                      contains the length of data received. 
    730  * @param flags         Bitmask combination of #pj_sock_msg_flag. 
     824 * @param flags         Flags (such as pj_MSG_PEEK()). 
    731825 * @param from          If not NULL, it will be filled with the source 
    732826 *                      address of the connection. 
     
    752846 *                      Upon return, it will be filled with the length 
    753847 *                      of data sent. 
    754  * @param flags         Bitmask combination of #pj_sock_msg_flag. 
     848 * @param flags         Flags (such as pj_MSG_DONTROUTE()). 
    755849 * 
    756850 * @return              PJ_SUCCESS or the status code. 
     
    769863 *                      Upon return, it will be filled with the length 
    770864 *                      of data sent. 
    771  * @param flags         Bitmask combination of #pj_sock_msg_flag. 
     865 * @param flags         Flags (such as pj_MSG_DONTROUTE()). 
    772866 * @param to            The address to send. 
    773867 * @param tolen         The length of the address in bytes. 
Note: See TracChangeset for help on using the changeset viewer.