diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-07-22 13:42:56 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-07-22 13:42:56 +0000 |
commit | ca0e9bd20df27bb62875130a0db513256c92e75a (patch) | |
tree | 76e9d620d2826839286c2b6216c9d2d5df3ad44d | |
parent | 26e9af9bcbc271bc373dd9f106fd7b143efe7474 (diff) |
Changed all public header files to compile correctly when -ansi and -pedantic is used, also when g++ is used
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@622 74dad513-b988-da41-8d7b-12977e46ad98
30 files changed, 104 insertions, 101 deletions
diff --git a/pjlib-util/include/pjlib-util/scanner.h b/pjlib-util/include/pjlib-util/scanner.h index 57cdced9..e5e8ee41 100644 --- a/pjlib-util/include/pjlib-util/scanner.h +++ b/pjlib-util/include/pjlib-util/scanner.h @@ -179,7 +179,7 @@ enum /** Auto-skip new lines. */ - PJ_SCAN_AUTOSKIP_NEWLINE = 4, + PJ_SCAN_AUTOSKIP_NEWLINE = 4 }; diff --git a/pjlib/include/pj/compat/cc_gcc.h b/pjlib/include/pj/compat/cc_gcc.h index 46b6afc0..1cbc3534 100644 --- a/pjlib/include/pj/compat/cc_gcc.h +++ b/pjlib/include/pj/compat/cc_gcc.h @@ -34,15 +34,23 @@ #define PJ_CC_VER_3 __GNUC_PATCHLEVEL__ -#define PJ_INLINE_SPECIFIER static inline #define PJ_THREAD_FUNC #define PJ_NORETURN -#define PJ_ATTR_NORETURN __attribute__ ((noreturn)) #define PJ_HAS_INT64 1 -typedef long long pj_int64_t; -typedef unsigned long long pj_uint64_t; +#ifdef __STRICT_ANSI__ + #include <inttypes.h> + typedef int64_t pj_int64_t; + typedef uint64_t pj_uint64_t; + #define PJ_INLINE_SPECIFIER static __inline + #define PJ_ATTR_NORETURN +#else + typedef long long pj_int64_t; + typedef unsigned long long pj_uint64_t; + #define PJ_INLINE_SPECIFIER static inline + #define PJ_ATTR_NORETURN __attribute__ ((noreturn)) +#endif #define PJ_INT64(val) val##LL #define PJ_UINT64(val) val##LLU diff --git a/pjlib/include/pj/ctype.h b/pjlib/include/pj/ctype.h index 0319cfdb..6b8df9f5 100644 --- a/pjlib/include/pj/ctype.h +++ b/pjlib/include/pj/ctype.h @@ -62,7 +62,7 @@ PJ_INLINE(int) pj_isalpha(int c) { return isalpha(c); } * @return Non-zero value if c is a particular representation of * an ASCII character. */ -PJ_INLINE(int) pj_isascii(int c) { return isascii(c); } +PJ_INLINE(int) pj_isascii(int c) { return c<128 && c>=0; } /** * Returns a non-zero value if c is a particular representation of diff --git a/pjlib/include/pj/file_io.h b/pjlib/include/pj/file_io.h index ea0e207c..d71ac55d 100644 --- a/pjlib/include/pj/file_io.h +++ b/pjlib/include/pj/file_io.h @@ -61,7 +61,7 @@ enum pj_file_access PJ_O_WRONLY = 0x1102, /**< Open file for writing. */ PJ_O_RDWR = 0x1103, /**< Open file for reading and writing. File will be truncated. */ - PJ_O_APPEND = 0x1108, /**< Append to existing file. */ + PJ_O_APPEND = 0x1108 /**< Append to existing file. */ }; /** @@ -71,7 +71,7 @@ enum pj_file_seek_type { PJ_SEEK_SET = 0x1201, /**< Offset from beginning of the file. */ PJ_SEEK_CUR = 0x1202, /**< Offset from current position. */ - PJ_SEEK_END = 0x1203, /**< Size of the file plus offset. */ + PJ_SEEK_END = 0x1203 /**< Size of the file plus offset. */ }; /** diff --git a/pjlib/include/pj/ioqueue.h b/pjlib/include/pj/ioqueue.h index 62bca309..0f77f6f6 100644 --- a/pjlib/include/pj/ioqueue.h +++ b/pjlib/include/pj/ioqueue.h @@ -219,7 +219,7 @@ typedef enum pj_ioqueue_operation_e PJ_IOQUEUE_OP_SEND_TO = 32, /**< sendto() operation. */ #if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0 PJ_IOQUEUE_OP_ACCEPT = 64, /**< accept() operation. */ - PJ_IOQUEUE_OP_CONNECT = 128, /**< connect() operation. */ + PJ_IOQUEUE_OP_CONNECT = 128 /**< connect() operation. */ #endif /* PJ_HAS_TCP */ } pj_ioqueue_operation_e; diff --git a/pjlib/include/pj/log.h b/pjlib/include/pj/log.h index eeb90006..48ac8d3f 100644 --- a/pjlib/include/pj/log.h +++ b/pjlib/include/pj/log.h @@ -77,7 +77,7 @@ enum pj_log_decoration PJ_LOG_HAS_MICRO_SEC = 32, /**< Include microseconds [yes] */ PJ_LOG_HAS_SENDER = 64, /**< Include sender in the log [yes]. */ PJ_LOG_HAS_NEWLINE = 128, /**< Terminate each call with newline [yes].*/ - PJ_LOG_HAS_CR = 256, /**< Include carriage return [no]. */ + PJ_LOG_HAS_CR = 256 /**< Include carriage return [no]. */ }; /** @@ -249,7 +249,7 @@ PJ_DECL(unsigned) pj_log_get_decor(void); * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /* * Log functions implementation prototypes. * These functions are called by PJ_LOG macros according to verbosity diff --git a/pjlib/include/pj/os.h b/pjlib/include/pj/os.h index 2a57ab87..e87d5ad6 100644 --- a/pjlib/include/pj/os.h +++ b/pjlib/include/pj/os.h @@ -33,7 +33,7 @@ PJ_BEGIN_DECL */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_THREAD Threads * @ingroup PJ_OS @@ -226,7 +226,7 @@ PJ_DECL(pj_status_t) pj_thread_get_stack_info(pj_thread_t *thread, * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_TLS Thread Local Storage. * @ingroup PJ_OS @@ -271,7 +271,7 @@ PJ_DECL(void*) pj_thread_local_get(long index); */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_ATOMIC Atomic Variables * @ingroup PJ_OS @@ -382,7 +382,7 @@ PJ_DECL(pj_atomic_value_t) pj_atomic_add_and_get( pj_atomic_t *atomic_var, * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_MUTEX Mutexes. * @ingroup PJ_OS @@ -403,7 +403,7 @@ typedef enum pj_mutex_type_e { PJ_MUTEX_DEFAULT, PJ_MUTEX_SIMPLE, - PJ_MUTEX_RECURSE, + PJ_MUTEX_RECURSE } pj_mutex_type_e; @@ -500,7 +500,7 @@ PJ_DECL(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex); * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_RW_MUTEX Reader/Writer Mutex * @ingroup PJ_OS @@ -576,7 +576,7 @@ PJ_DECL(pj_status_t) pj_rwmutex_destroy(pj_rwmutex_t *mutex); */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_CRIT_SEC Critical sections. * @ingroup PJ_OS @@ -610,7 +610,7 @@ PJ_DECL(void) pj_leave_critical_section(void); * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ #if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0 /** * @defgroup PJ_SEM Semaphores. @@ -679,7 +679,7 @@ PJ_DECL(pj_status_t) pj_sem_destroy(pj_sem_t *sem); #endif /* PJ_HAS_SEMAPHORE */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ #if defined(PJ_HAS_EVENT_OBJ) && PJ_HAS_EVENT_OBJ != 0 /** * @defgroup PJ_EVENT Event Object. @@ -771,7 +771,7 @@ PJ_DECL(pj_status_t) pj_event_destroy(pj_event_t *event); */ #endif /* PJ_HAS_EVENT_OBJ */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @addtogroup PJ_TIME Time Data Type and Manipulation. * @ingroup PJ_OS @@ -836,7 +836,7 @@ PJ_DECL(pj_status_t) pj_time_gmt_to_local(pj_time_val *tv); * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ #if defined(PJ_TERM_HAS_COLOR) && PJ_TERM_HAS_COLOR != 0 /** @@ -867,7 +867,7 @@ PJ_DECL(pj_color_t) pj_term_get_color(void); #endif /* PJ_TERM_HAS_COLOR */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_TIMESTAMP High Resolution Timestamp * @ingroup PJ_OS @@ -1046,7 +1046,7 @@ PJ_DECL(pj_uint32_t) pj_elapsed_cycle( const pj_timestamp *start, /** @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Internal PJLIB function to initialize the threading subsystem. * @return PJ_SUCCESS or the appropriate error code. diff --git a/pjlib/include/pj/pool.h b/pjlib/include/pj/pool.h index 7f7fd2b3..34076099 100644 --- a/pjlib/include/pj/pool.h +++ b/pjlib/include/pj/pool.h @@ -312,7 +312,7 @@ PJ_IDECL(void*) pj_pool_calloc( pj_pool_t *pool, pj_size_t count, * @} // PJ_POOL */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_POOL_FACTORY Pool Factory and Policy. * @ingroup PJ_POOL_GROUP @@ -526,7 +526,7 @@ PJ_INLINE(void) pj_pool_factory_dump( pj_pool_factory *pf, * @} // PJ_POOL_FACTORY */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJ_CACHING_POOL Caching Pool Factory. diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h index b5a9dcf5..a6e760aa 100644 --- a/pjlib/include/pj/sock.h +++ b/pjlib/include/pj/sock.h @@ -109,7 +109,7 @@ typedef enum pj_sock_msg_flag { PJ_MSG_OOB = 0x01, /**< Out-of-band messages. */ PJ_MSG_PEEK = 0x02, /**< Peek, don't remove from buffer. */ - PJ_MSG_DONTROUTE = 0x04, /**< Don't route. */ + PJ_MSG_DONTROUTE = 0x04 /**< Don't route. */ } pj_sock_msg_flag; @@ -123,7 +123,7 @@ typedef enum pj_socket_sd_type PJ_SD_SEND = 1, /**< No more sending. */ PJ_SHUT_WR = 1, /**< Alias for SD_SEND. */ PJ_SD_BOTH = 2, /**< No more send and receive. */ - PJ_SHUT_RDWR = 2, /**< Alias for SD_BOTH. */ + PJ_SHUT_RDWR = 2 /**< Alias for SD_BOTH. */ } pj_socket_sd_type; @@ -379,7 +379,7 @@ PJ_INLINE(pj_in_addr) pj_sockaddr_in_get_addr(const pj_sockaddr_in *addr) pj_in_addr in_addr; in_addr.s_addr = pj_ntohl(addr->sin_addr.s_addr); return in_addr; -}; +} /** * Set the IP address of an Internet socket address. diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h index 5a275514..cae418af 100644 --- a/pjlib/include/pj/types.h +++ b/pjlib/include/pj/types.h @@ -36,7 +36,7 @@ PJ_BEGIN_DECL -/////////////////////////////////////////////////////////////////////////////// +/* ************************************************************************* */ /** Unsigned 32bit integer. */ typedef int pj_int32_t; @@ -103,7 +103,7 @@ typedef pj_int64_t pj_off_t; typedef pj_ssize_t pj_off_t; #endif -/////////////////////////////////////////////////////////////////////////////// +/* ************************************************************************* */ /* * Data structure types. */ @@ -230,7 +230,7 @@ typedef struct pj_atomic_t pj_atomic_t; */ typedef PJ_ATOMIC_VALUE_TYPE pj_atomic_value_t; -/////////////////////////////////////////////////////////////////////////////// +/* ************************************************************************* */ /** Thread handle. */ typedef struct pj_thread_t pj_thread_t; @@ -268,7 +268,7 @@ typedef unsigned int pj_color_t; /** Exception id. */ typedef int pj_exception_id_t; -/////////////////////////////////////////////////////////////////////////////// +/* ************************************************************************* */ /** Utility macro to compute the number of elements in static array. */ #define PJ_ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) @@ -281,7 +281,7 @@ typedef int pj_exception_id_t; */ #define PJ_MAX_OBJ_NAME 16 -/////////////////////////////////////////////////////////////////////////////// +/* ************************************************************************* */ /* * General. */ @@ -497,7 +497,7 @@ typedef struct pj_parsed_time * @} // Time Management */ -/////////////////////////////////////////////////////////////////////////////// +/* ************************************************************************* */ /* * Terminal. */ diff --git a/pjmedia/include/pjmedia-codec/types.h b/pjmedia/include/pjmedia-codec/types.h index e28c9f38..a738fb68 100644 --- a/pjmedia/include/pjmedia-codec/types.h +++ b/pjmedia/include/pjmedia-codec/types.h @@ -48,7 +48,7 @@ enum PJMEDIA_RTP_PT_L16_32KHZ_MONO, /**< L16 @ 32KHz, mono */ PJMEDIA_RTP_PT_L16_32KHZ_STEREO, /**< L16 @ 32KHz, stereo */ PJMEDIA_RTP_PT_L16_48KHZ_MONO, /**< L16 @ 48KHz, mono */ - PJMEDIA_RTP_PT_L16_48KHZ_STEREO, /**< L16 @ 48KHz, stereo */ + PJMEDIA_RTP_PT_L16_48KHZ_STEREO /**< L16 @ 48KHz, stereo */ }; diff --git a/pjmedia/include/pjmedia/clock.h b/pjmedia/include/pjmedia/clock.h index 36aeb3b3..a0f184d2 100644 --- a/pjmedia/include/pjmedia/clock.h +++ b/pjmedia/include/pjmedia/clock.h @@ -62,7 +62,7 @@ enum pjmedia_clock_options * application must poll the clock continuously by calling * #pjmedia_clock_wait() in order to synchronize timing. */ - PJMEDIA_CLOCK_NO_ASYNC = 1, + PJMEDIA_CLOCK_NO_ASYNC = 1 }; diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h index 5f5aab89..844f8865 100644 --- a/pjmedia/include/pjmedia/codec.h +++ b/pjmedia/include/pjmedia/codec.h @@ -220,7 +220,7 @@ enum pjmedia_rtp_pt PJMEDIA_RTP_PT_MP2T = 33, /**< video MPEG2 transport */ PJMEDIA_RTP_PT_H263 = 34, /**< video H263 */ - PJMEDIA_RTP_PT_DYNAMIC = 96, /**< start of dynamic RTP payload */ + PJMEDIA_RTP_PT_DYNAMIC = 96 /**< start of dynamic RTP payload */ }; @@ -575,7 +575,7 @@ typedef enum pjmedia_codec_priority * be listed by #pjmedia_codec_mgr_enum_codecs() and other codec * query functions. */ - PJMEDIA_CODEC_PRIO_DISABLED = 0, + PJMEDIA_CODEC_PRIO_DISABLED = 0 } pjmedia_codec_priority; diff --git a/pjmedia/include/pjmedia/conference.h b/pjmedia/include/pjmedia/conference.h index 9cb7c861..083fc0f1 100644 --- a/pjmedia/include/pjmedia/conference.h +++ b/pjmedia/include/pjmedia/conference.h @@ -71,7 +71,7 @@ enum pjmedia_conf_option microphone device. */ PJMEDIA_CONF_NO_DEVICE = 2, /**< Do not create sound device. */ PJMEDIA_CONF_SMALL_FILTER=4,/**< Use small filter table when resampling */ - PJMEDIA_CONF_USE_LINEAR=8, /**< Use linear resampling instead of filter + PJMEDIA_CONF_USE_LINEAR=8 /**< Use linear resampling instead of filter based. */ }; diff --git a/pjmedia/include/pjmedia/port.h b/pjmedia/include/pjmedia/port.h index cd0dbe9a..794b3139 100644 --- a/pjmedia/include/pjmedia/port.h +++ b/pjmedia/include/pjmedia/port.h @@ -255,7 +255,7 @@ enum pjmedia_port_op /** * Enable TX and RX to/from this port. */ - PJMEDIA_PORT_ENABLE, + PJMEDIA_PORT_ENABLE }; @@ -292,7 +292,7 @@ typedef enum pjmedia_frame_type { PJMEDIA_FRAME_TYPE_NONE, /**< No frame. */ PJMEDIA_FRAME_TYPE_CNG, /**< Silence audio frame. */ - PJMEDIA_FRAME_TYPE_AUDIO, /**< Normal audio frame. */ + PJMEDIA_FRAME_TYPE_AUDIO /**< Normal audio frame. */ } pjmedia_frame_type; diff --git a/pjmedia/include/pjmedia/resample.h b/pjmedia/include/pjmedia/resample.h index ae129f1f..90f3d446 100644 --- a/pjmedia/include/pjmedia/resample.h +++ b/pjmedia/include/pjmedia/resample.h @@ -139,7 +139,7 @@ enum pjmedia_resample_port_options /** * Do not destroy downstream port when resample port is destroyed. */ - PJMEDIA_RESAMPLE_DONT_DESTROY_DN = 4, + PJMEDIA_RESAMPLE_DONT_DESTROY_DN = 4 }; diff --git a/pjmedia/include/pjmedia/sdp_neg.h b/pjmedia/include/pjmedia/sdp_neg.h index 4a07cfe6..6fbb799a 100644 --- a/pjmedia/include/pjmedia/sdp_neg.h +++ b/pjmedia/include/pjmedia/sdp_neg.h @@ -272,7 +272,7 @@ enum pjmedia_sdp_neg_state * This state occurs when SDP negotiation has completed, either * successfully or not. */ - PJMEDIA_SDP_NEG_STATE_DONE, + PJMEDIA_SDP_NEG_STATE_DONE }; diff --git a/pjmedia/include/pjmedia/transport_udp.h b/pjmedia/include/pjmedia/transport_udp.h index bf40f83b..860ea7e3 100644 --- a/pjmedia/include/pjmedia/transport_udp.h +++ b/pjmedia/include/pjmedia/transport_udp.h @@ -51,7 +51,7 @@ enum pjmedia_transport_udp_options * received. * Specifying this option will disable this feature. */ - PJMEDIA_UDP_NO_SRC_ADDR_CHECKING = 1, + PJMEDIA_UDP_NO_SRC_ADDR_CHECKING = 1 }; diff --git a/pjmedia/include/pjmedia/types.h b/pjmedia/include/pjmedia/types.h index c49e6be4..78eb6a9b 100644 --- a/pjmedia/include/pjmedia/types.h +++ b/pjmedia/include/pjmedia/types.h @@ -63,7 +63,7 @@ typedef enum pjmedia_type /** Unknown media type, in this case the name will be specified in * encoding_name. */ - PJMEDIA_TYPE_UNKNOWN = 3, + PJMEDIA_TYPE_UNKNOWN = 3 } pjmedia_type; @@ -84,7 +84,7 @@ typedef enum pjmedia_dir PJMEDIA_DIR_DECODING = 2, /** Incoming and outgoing stream. */ - PJMEDIA_DIR_ENCODING_DECODING = 3, + PJMEDIA_DIR_ENCODING_DECODING = 3 } pjmedia_dir; diff --git a/pjmedia/include/pjmedia/wav_port.h b/pjmedia/include/pjmedia/wav_port.h index 01b3ae25..e485354c 100644 --- a/pjmedia/include/pjmedia/wav_port.h +++ b/pjmedia/include/pjmedia/wav_port.h @@ -46,7 +46,7 @@ enum pjmedia_file_player_option * Tell the file player to return NULL frame when the whole * file has been played. */ - PJMEDIA_FILE_NO_LOOP = 1, + PJMEDIA_FILE_NO_LOOP = 1 }; diff --git a/pjsip/include/pjsip/sip_auth.h b/pjsip/include/pjsip/sip_auth.h index b049e1c4..3028f840 100644 --- a/pjsip/include/pjsip/sip_auth.h +++ b/pjsip/include/pjsip/sip_auth.h @@ -50,7 +50,7 @@ PJ_BEGIN_DECL typedef enum pjsip_cred_data_type { PJSIP_CRED_DATA_PLAIN_PASSWD, /**< Plain text password. */ - PJSIP_CRED_DATA_DIGEST, /**< Hashed digest. */ + PJSIP_CRED_DATA_DIGEST /**< Hashed digest. */ } pjsip_cred_data_type; /** Authentication's quality of protection (qop) type. */ @@ -59,7 +59,7 @@ typedef enum pjsip_auth_qop_type PJSIP_AUTH_QOP_NONE, /**< No quality of protection. */ PJSIP_AUTH_QOP_AUTH, /**< Authentication. */ PJSIP_AUTH_QOP_AUTH_INT, /**< Authentication with integrity protection. */ - PJSIP_AUTH_QOP_UNKNOWN, /**< Unknown protection. */ + PJSIP_AUTH_QOP_UNKNOWN /**< Unknown protection. */ } pjsip_auth_qop_type; diff --git a/pjsip/include/pjsip/sip_dialog.h b/pjsip/include/pjsip/sip_dialog.h index e796b0a3..123209be 100644 --- a/pjsip/include/pjsip/sip_dialog.h +++ b/pjsip/include/pjsip/sip_dialog.h @@ -76,14 +76,14 @@ typedef struct pjsip_dlg_party /** * Dialog state. */ -enum pjsip_dialog_state +typedef enum pjsip_dialog_state { /** Dialog is not established. */ PJSIP_DIALOG_STATE_NULL, /** Dialog has been established (probably early) */ - PJSIP_DIALOG_STATE_ESTABLISHED, -}; + PJSIP_DIALOG_STATE_ESTABLISHED +} pjsip_dialog_state; /** * This structure describes the dialog structure. Application MUST NOT diff --git a/pjsip/include/pjsip/sip_event.h b/pjsip/include/pjsip/sip_event.h index 5dc9d457..3796356f 100644 --- a/pjsip/include/pjsip/sip_event.h +++ b/pjsip/include/pjsip/sip_event.h @@ -59,7 +59,7 @@ typedef enum pjsip_event_id_e PJSIP_EVENT_TSX_STATE, /** Indicates that the event was triggered by user action. */ - PJSIP_EVENT_USER, + PJSIP_EVENT_USER } pjsip_event_id_e; diff --git a/pjsip/include/pjsip/sip_module.h b/pjsip/include/pjsip/sip_module.h index ef13e278..6b340e0c 100644 --- a/pjsip/include/pjsip/sip_module.h +++ b/pjsip/include/pjsip/sip_module.h @@ -207,7 +207,7 @@ enum pjsip_module_priority /** * This is the recommended priority to be used by applications. */ - PJSIP_MOD_PRIORITY_APPLICATION = 64, + PJSIP_MOD_PRIORITY_APPLICATION = 64 }; diff --git a/pjsip/include/pjsip/sip_msg.h b/pjsip/include/pjsip/sip_msg.h index 0f01c06b..af7ad922 100644 --- a/pjsip/include/pjsip/sip_msg.h +++ b/pjsip/include/pjsip/sip_msg.h @@ -37,7 +37,7 @@ PJ_BEGIN_DECL * @{ */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJSIP_MSG_METHOD Methods * @brief Method names and manipulation. @@ -60,7 +60,7 @@ typedef enum pjsip_method_e PJSIP_REGISTER_METHOD, /**< REGISTER method. */ PJSIP_OPTIONS_METHOD, /**< OPTIONS method. */ - PJSIP_OTHER_METHOD, /**< Other method. */ + PJSIP_OTHER_METHOD /**< Other method. */ } pjsip_method_e; @@ -153,7 +153,7 @@ PJ_DECL(int) pjsip_method_cmp( const pjsip_method *m1, const pjsip_method *m2); * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJSIP_MSG_HDR Header Fields * @brief Declarations for various SIP header fields. @@ -218,7 +218,7 @@ typedef enum pjsip_hdr_e PJSIP_H_WARNING_UNIMP, /* N/A, use pjsip_generic_string_hdr */ PJSIP_H_WWW_AUTHENTICATE, - PJSIP_H_OTHER, + PJSIP_H_OTHER } pjsip_hdr_e; @@ -334,7 +334,7 @@ PJ_DECL(int) pjsip_hdr_print_on( void *hdr, char *buf, pj_size_t len); * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJSIP_MSG_LINE Request and Status Line. * @brief Request and status line structures and manipulation. @@ -432,8 +432,8 @@ typedef enum pjsip_status_code PJSIP_SC_NOT_ACCEPTABLE_ANYWHERE = 606, PJSIP_SC_TSX_TIMEOUT = 701, - //PJSIP_SC_TSX_RESOLVE_ERROR = 702, - PJSIP_SC_TSX_TRANSPORT_ERROR = 703, + /*PJSIP_SC_TSX_RESOLVE_ERROR = 702,*/ + PJSIP_SC_TSX_TRANSPORT_ERROR = 703 } pjsip_status_code; @@ -460,7 +460,7 @@ PJ_DECL(const pj_str_t*) pjsip_get_status_text(int status_code); * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @addtogroup PJSIP_MSG_MEDIA Media/MIME Type * @brief Media/MIME type declaration and manipulations. @@ -483,7 +483,7 @@ typedef struct pjsip_media_type * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @addtogroup PJSIP_MSG_BODY Message Body * @brief SIP message body structures and manipulation. @@ -652,7 +652,7 @@ PJ_DECL(pjsip_msg_body*) pjsip_msg_body_create( pj_pool_t *pool, * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @defgroup PJSIP_MSG_MSG Message Structure * @brief SIP message (request and response) structure and operations. @@ -666,7 +666,7 @@ PJ_DECL(pjsip_msg_body*) pjsip_msg_body_create( pj_pool_t *pool, typedef enum pjsip_msg_type_e { PJSIP_REQUEST_MSG, /**< Indicates request message. */ - PJSIP_RESPONSE_MSG, /**< Indicates response message. */ + PJSIP_RESPONSE_MSG /**< Indicates response message. */ } pjsip_msg_type_e; @@ -844,7 +844,7 @@ PJ_DECL(pj_ssize_t) pjsip_msg_print(const pjsip_msg *msg, * @} */ -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * @addtogroup PJSIP_MSG_HDR * @{ @@ -904,7 +904,7 @@ pjsip_generic_string_hdr_init( pj_pool_t *pool, -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Generic SIP header, which contains hname and a string hvalue. @@ -954,7 +954,7 @@ PJ_DECL(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_init( pj_pool_t *pool, const pj_str_t *hname, int value ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** Maximum elements in the header array. */ #define PJSIP_GENERIC_ARRAY_MAX_COUNT 32 @@ -1007,7 +1007,7 @@ PJ_DECL(pjsip_generic_array_hdr*) pjsip_generic_array_hdr_init(pj_pool_t *pool, const pj_str_t *hname); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** Accept header. */ typedef pjsip_generic_array_hdr pjsip_accept_hdr; @@ -1042,7 +1042,7 @@ PJ_DECL(pjsip_accept_hdr*) pjsip_accept_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Allow header. @@ -1077,7 +1077,7 @@ PJ_DECL(pjsip_allow_hdr*) pjsip_allow_hdr_create(pj_pool_t *pool); PJ_DECL(pjsip_allow_hdr*) pjsip_allow_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Call-ID header. @@ -1118,7 +1118,7 @@ PJ_DECL(pjsip_cid_hdr*) pjsip_cid_hdr_init( pj_pool_t *pool, -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Content-Length header. */ @@ -1154,7 +1154,7 @@ PJ_DECL(pjsip_clen_hdr*) pjsip_clen_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * CSeq header. */ @@ -1190,7 +1190,7 @@ PJ_DECL(pjsip_cseq_hdr*) pjsip_cseq_hdr_create( pj_pool_t *pool ); PJ_DECL(pjsip_cseq_hdr*) pjsip_cseq_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Contact header. * In this library, contact header only contains single URI. If a message has @@ -1234,7 +1234,7 @@ PJ_DECL(pjsip_contact_hdr*) pjsip_contact_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Content-Type. */ @@ -1270,7 +1270,7 @@ PJ_DECL(pjsip_ctype_hdr*) pjsip_ctype_hdr_create( pj_pool_t *pool ); PJ_DECL(pjsip_ctype_hdr*) pjsip_ctype_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** Expires header. */ typedef pjsip_generic_int_hdr pjsip_expires_hdr; @@ -1306,7 +1306,7 @@ PJ_DECL(pjsip_expires_hdr*) pjsip_expires_hdr_init( pj_pool_t *pool, -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * To or From header. */ @@ -1391,7 +1391,7 @@ PJ_DECL(pjsip_from_hdr*) pjsip_fromto_hdr_set_from( pjsip_fromto_hdr *hdr ); PJ_DECL(pjsip_to_hdr*) pjsip_fromto_hdr_set_to( pjsip_fromto_hdr *hdr ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Max-Forwards header. */ @@ -1428,7 +1428,7 @@ PJ_DECL(pjsip_max_fwd_hdr*) pjsip_max_fwd_hdr_init( pj_pool_t *pool, void *mem, int value ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Min-Expires header. */ @@ -1466,7 +1466,7 @@ PJ_DECL(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_init( pj_pool_t *pool, int value ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Record-Route and Route headers. */ @@ -1550,7 +1550,7 @@ PJ_DECL(pjsip_rr_hdr*) pjsip_routing_hdr_set_rr( pjsip_routing_hdr *r ); */ PJ_DECL(pjsip_route_hdr*) pjsip_routing_hdr_set_route( pjsip_routing_hdr *r ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Require header. */ @@ -1583,7 +1583,7 @@ PJ_DECL(pjsip_require_hdr*) pjsip_require_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Retry-After header. */ @@ -1615,7 +1615,7 @@ PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_init( pj_pool_t *pool, int value ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Supported header. */ @@ -1642,7 +1642,7 @@ PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_create(pj_pool_t *pool); PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * Unsupported header. */ @@ -1669,7 +1669,7 @@ PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_create(pj_pool_t *pool); PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * SIP Via header. * In this implementation, Via header can only have one element in each header. @@ -1711,7 +1711,7 @@ PJ_DECL(pjsip_via_hdr*) pjsip_via_hdr_create( pj_pool_t *pool ); PJ_DECL(pjsip_via_hdr*) pjsip_via_hdr_init( pj_pool_t *pool, void *mem ); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** * SIP Warning header. * In this version, Warning header is just a typedef for generic string @@ -1752,7 +1752,7 @@ pjsip_warning_hdr_create_from_status( pj_pool_t *pool, const pj_str_t *host, pj_status_t status); -/////////////////////////////////////////////////////////////////////////////// +/* **************************************************************************/ /** Accept-Encoding header. */ typedef pjsip_generic_string_hdr pjsip_accept_encoding_hdr; @@ -1876,7 +1876,7 @@ typedef pjsip_generic_string_hdr pjsip_user_agent_hdr; */ /** - * @} // PJSIP_MSG + * @} PJSIP_MSG */ diff --git a/pjsip/include/pjsip/sip_parser.h b/pjsip/include/pjsip/sip_parser.h index 452f5f4d..d0eb838e 100644 --- a/pjsip/include/pjsip/sip_parser.h +++ b/pjsip/include/pjsip/sip_parser.h @@ -54,7 +54,7 @@ enum * the URI is not enclosed in brackets ("<" and ">"), all parameters * are treated as header parameters (not URI parameters). */ - PJSIP_PARSE_URI_IN_FROM_TO_HDR = 2, + PJSIP_PARSE_URI_IN_FROM_TO_HDR = 2 }; /** @@ -354,7 +354,7 @@ extern const pj_str_t pjsip_USER_STR, /**< "user" string constant. */ */ enum { - PJSIP_PARSE_REMOVE_QUOTE = 1, + PJSIP_PARSE_REMOVE_QUOTE = 1 }; /* Parse parameter in header (matching the character as token) */ diff --git a/pjsip/include/pjsip/sip_transaction.h b/pjsip/include/pjsip/sip_transaction.h index 1f44e7b6..e15fd13d 100644 --- a/pjsip/include/pjsip/sip_transaction.h +++ b/pjsip/include/pjsip/sip_transaction.h @@ -68,7 +68,7 @@ typedef enum pjsip_tsx_state_e PJSIP_TSX_STATE_CONFIRMED, /**< For UAS, after ACK is received. */ PJSIP_TSX_STATE_TERMINATED, /**< For UAS/UAC, before it's destroyed. */ PJSIP_TSX_STATE_DESTROYED, /**< For UAS/UAC, will be destroyed now. */ - PJSIP_TSX_STATE_MAX, /**< Number of states. */ + PJSIP_TSX_STATE_MAX /**< Number of states. */ } pjsip_tsx_state_e; diff --git a/pjsip/include/pjsip/sip_transport.h b/pjsip/include/pjsip/sip_transport.h index 2f8f679f..69a9f624 100644 --- a/pjsip/include/pjsip/sip_transport.h +++ b/pjsip/include/pjsip/sip_transport.h @@ -62,7 +62,7 @@ enum pjsip_transport_flags_e { PJSIP_TRANSPORT_RELIABLE = 1, /**< Transport is reliable. */ PJSIP_TRANSPORT_SECURE = 2, /**< Transport is secure. */ - PJSIP_TRANSPORT_DATAGRAM = 4, /**< Datagram based transport. + PJSIP_TRANSPORT_DATAGRAM = 4 /**< Datagram based transport. (it's also assumed to be connectionless) */ }; diff --git a/pjsip/include/pjsip/sip_types.h b/pjsip/include/pjsip/sip_types.h index 8ca8a041..d50fdba0 100644 --- a/pjsip/include/pjsip/sip_types.h +++ b/pjsip/include/pjsip/sip_types.h @@ -79,7 +79,7 @@ typedef enum pjsip_transport_type_e PJSIP_TRANSPORT_LOOP, /** Loopback (datagram, unreliable) */ - PJSIP_TRANSPORT_LOOP_DGRAM, + PJSIP_TRANSPORT_LOOP_DGRAM } pjsip_transport_type_e; @@ -162,11 +162,6 @@ typedef pjsip_module pjsip_user_agent; typedef struct pjsip_dialog pjsip_dialog; /** - * Dialog state (sip_dialog.h). - */ -typedef enum pjsip_dialog_state pjsip_dialog_state; - -/** * Transaction role. */ typedef enum pjsip_role_e @@ -177,7 +172,7 @@ typedef enum pjsip_role_e /* Alias: */ PJSIP_UAC_ROLE = PJSIP_ROLE_UAC, /**< Role is UAC. */ - PJSIP_UAS_ROLE = PJSIP_ROLE_UAS, /**< Role is UAS. */ + PJSIP_UAS_ROLE = PJSIP_ROLE_UAS /**< Role is UAS. */ } pjsip_role_e; diff --git a/pjsip/include/pjsip/sip_uri.h b/pjsip/include/pjsip/sip_uri.h index e5981f67..aa0fdf21 100644 --- a/pjsip/include/pjsip/sip_uri.h +++ b/pjsip/include/pjsip/sip_uri.h @@ -144,7 +144,7 @@ typedef enum pjsip_uri_context_e PJSIP_URI_IN_FROMTO_HDR, /**< The URI is in From/To header. */ PJSIP_URI_IN_CONTACT_HDR, /**< The URI is in Contact header. */ PJSIP_URI_IN_ROUTING_HDR, /**< The URI is in Route/Record-Route header. */ - PJSIP_URI_IN_OTHER, /**< Other context (web page, business card, etc.) */ + PJSIP_URI_IN_OTHER /**< Other context (web page, business card, etc.) */ } pjsip_uri_context_e; /** |