Changeset 1417 for pjproject/trunk/pjsip/include/pjsip/sip_parser.h
- Timestamp:
- Aug 16, 2007 10:11:44 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_parser.h
r974 r1417 316 316 317 317 318 /* 319 * Various specification used in parsing, exported here as extern for other 320 * parsers. 321 */ 322 extern pj_cis_t 323 pjsip_HOST_SPEC, /**< For scanning host part. */ 324 pjsip_DIGIT_SPEC, /**< Decimal digits */ 325 pjsip_ALPHA_SPEC, /**< Alpha (A-Z, a-z) */ 326 pjsip_ALNUM_SPEC, /**< Decimal + Alpha. */ 327 pjsip_TOKEN_SPEC, /**< Token. */ 328 pjsip_TOKEN_SPEC_ESC, /**< Token without '%' character */ 329 pjsip_HEX_SPEC, /**< Hexadecimal digits. */ 330 pjsip_PARAM_CHAR_SPEC, /**< For scanning pname (or pvalue when it's 331 not quoted.) in URI */ 332 pjsip_PARAM_CHAR_SPEC_ESC, /**< Variant without the escape ('%') char */ 333 pjsip_HDR_CHAR_SPEC, /**< Chars in hname/havalue in URL. */ 334 pjsip_HDR_CHAR_SPEC_ESC, /**< Variant without the escape ('%') char */ 335 pjsip_PROBE_USER_HOST_SPEC, /**< Hostname characters. */ 336 pjsip_PASSWD_SPEC, /**< Password. */ 337 pjsip_PASSWD_SPEC_ESC, /**< Variant without the escape ('%') char */ 338 pjsip_USER_SPEC, /**< User */ 339 pjsip_USER_SPEC_ESC, /**< Variant without the escape ('%') char */ 340 pjsip_NOT_NEWLINE, /**< For eating up header, basicly any chars 341 except newlines or zero. */ 342 pjsip_NOT_COMMA_OR_NEWLINE, /**< Array elements. */ 343 pjsip_DISPLAY_SPEC; /**< Used when searching for display name. */ 344 345 /* 346 * Various string constants. 347 */ 348 extern const pj_str_t pjsip_USER_STR, /**< "user" string constant. */ 349 pjsip_METHOD_STR, /**< "method" string constant */ 350 pjsip_TRANSPORT_STR, /**< "transport" string const. */ 351 pjsip_MADDR_STR, /**< "maddr" string const. */ 352 pjsip_LR_STR, /**< "lr" string const. */ 353 pjsip_SIP_STR, /**< "sip" string constant. */ 354 pjsip_SIPS_STR, /**< "sips" string constant. */ 355 pjsip_TEL_STR, /**< "tel" string constant. */ 356 pjsip_BRANCH_STR, /**< "branch" string constant. */ 357 pjsip_TTL_STR, /**< "ttl" string constant. */ 358 pjsip_RECEIVED_STR, /**< "received" string const. */ 359 pjsip_Q_STR, /**< "q" string constant. */ 360 pjsip_EXPIRES_STR, /**< "expires" string constant. */ 361 pjsip_TAG_STR, /**< "tag" string constant. */ 362 pjsip_RPORT_STR; /**< "rport" string const. */ 318 /** 319 * Parser constants. @see pjsip_parser_const() 320 */ 321 typedef struct pjsip_parser_const_t 322 { 323 const pj_str_t pjsip_USER_STR; /**< "user" string constant. */ 324 const pj_str_t pjsip_METHOD_STR; /**< "method" string constant */ 325 const pj_str_t pjsip_TRANSPORT_STR; /**< "transport" string const. */ 326 const pj_str_t pjsip_MADDR_STR; /**< "maddr" string const. */ 327 const pj_str_t pjsip_LR_STR; /**< "lr" string const. */ 328 const pj_str_t pjsip_SIP_STR; /**< "sip" string constant. */ 329 const pj_str_t pjsip_SIPS_STR; /**< "sips" string constant. */ 330 const pj_str_t pjsip_TEL_STR; /**< "tel" string constant. */ 331 const pj_str_t pjsip_BRANCH_STR; /**< "branch" string constant. */ 332 const pj_str_t pjsip_TTL_STR; /**< "ttl" string constant. */ 333 const pj_str_t pjsip_RECEIVED_STR; /**< "received" string const. */ 334 const pj_str_t pjsip_Q_STR; /**< "q" string constant. */ 335 const pj_str_t pjsip_EXPIRES_STR; /**< "expires" string constant. */ 336 const pj_str_t pjsip_TAG_STR; /**< "tag" string constant. */ 337 const pj_str_t pjsip_RPORT_STR; /**< "rport" string const. */ 338 339 pj_cis_t pjsip_HOST_SPEC; /**< For scanning host part. */ 340 pj_cis_t pjsip_DIGIT_SPEC; /**< Decimal digits */ 341 pj_cis_t pjsip_ALPHA_SPEC; /**< Alpha (A-Z, a-z) */ 342 pj_cis_t pjsip_ALNUM_SPEC; /**< Decimal + Alpha. */ 343 pj_cis_t pjsip_TOKEN_SPEC; /**< Token. */ 344 pj_cis_t pjsip_TOKEN_SPEC_ESC; /**< Token without '%' character */ 345 pj_cis_t pjsip_HEX_SPEC; /**< Hexadecimal digits. */ 346 pj_cis_t pjsip_PARAM_CHAR_SPEC; /**< For scanning pname (or pvalue 347 when it's not quoted.) in URI */ 348 pj_cis_t pjsip_PARAM_CHAR_SPEC_ESC; /**< Variant without the escape ('%') 349 char */ 350 pj_cis_t pjsip_HDR_CHAR_SPEC; /**< Chars in hname/havalue in URL. */ 351 pj_cis_t pjsip_HDR_CHAR_SPEC_ESC; /**< Variant without the escape ('%') 352 char */ 353 pj_cis_t pjsip_PROBE_USER_HOST_SPEC;/**< Hostname characters. */ 354 pj_cis_t pjsip_PASSWD_SPEC; /**< Password. */ 355 pj_cis_t pjsip_PASSWD_SPEC_ESC; /**< Variant without the escape ('%') 356 char */ 357 pj_cis_t pjsip_USER_SPEC; /**< User */ 358 pj_cis_t pjsip_USER_SPEC_ESC; /**< Variant without the escape ('%') 359 char */ 360 pj_cis_t pjsip_USER_SPEC_LENIENT; /**< User, with additional '#' char */ 361 pj_cis_t pjsip_USER_SPEC_LENIENT_ESC;/**< pjsip_USER_SPEC_ESC with '#' */ 362 pj_cis_t pjsip_NOT_NEWLINE; /**< For eating up header, basically 363 any chars except newlines or 364 zero. */ 365 pj_cis_t pjsip_NOT_COMMA_OR_NEWLINE;/**< Array elements. */ 366 pj_cis_t pjsip_DISPLAY_SPEC; /**< Used when searching for display 367 name. */ 368 369 } pjsip_parser_const_t; 370 371 372 /** 373 * Get parser constants. 374 */ 375 PJ_DECL(const pjsip_parser_const_t*) pjsip_parser_const(void); 363 376 364 377 … … 372 385 373 386 /* Parse parameter in header (matching the character as token) */ 374 void pjsip_parse_param_imp(pj_scanner *scanner, pj_pool_t *pool,375 pj_str_t *pname, pj_str_t *pvalue,376 unsigned opt);387 PJ_DECL(void) pjsip_parse_param_imp(pj_scanner *scanner, pj_pool_t *pool, 388 pj_str_t *pname, pj_str_t *pvalue, 389 unsigned opt); 377 390 /* Parse parameter in URL (matching the character as paramchar) */ 378 void pjsip_parse_uri_param_imp( pj_scanner *scanner, pj_pool_t *pool, 379 pj_str_t *pname, pj_str_t *pvalue, 380 unsigned opt); 381 void pjsip_concat_param_imp( pj_str_t *param, pj_pool_t *pool, 382 const pj_str_t *pname, const pj_str_t *pvalue, 383 int sepchar); 384 void pjsip_parse_end_hdr_imp ( pj_scanner *scanner ); 391 PJ_DECL(void) pjsip_parse_uri_param_imp(pj_scanner *scanner, pj_pool_t *pool, 392 pj_str_t *pname, pj_str_t *pvalue, 393 unsigned opt); 394 PJ_DECL(void) pjsip_concat_param_imp(pj_str_t *param, pj_pool_t *pool, 395 const pj_str_t *pname, 396 const pj_str_t *pvalue, 397 int sepchar); 398 PJ_DECL(void) pjsip_parse_end_hdr_imp ( pj_scanner *scanner ); 385 399 386 400 PJ_END_DECL
Note: See TracChangeset
for help on using the changeset viewer.