ext/sip_parser/sip_parser.h in oversip-1.3.8 vs ext/sip_parser/sip_parser.h in oversip-1.4.0

- old
+ new

@@ -154,11 +154,11 @@ int cs; size_t nread; char * error_start; size_t error_len; int error_pos; - + size_t mark; size_t hdr_field_start; size_t hdr_field_len; size_t hdr_value_start; size_t hdr_value_len; @@ -201,11 +201,11 @@ enum uri_owner uri_owner; /* URI scheme type. */ enum uri_scheme uri_scheme; /* URI display name is quoted. */ size_t uri_display_name_quoted; - + header_cb header; struct_message message; struct_uri uri; /* Can be set to OverSIP::SIP::Request, OverSIP::SIP::Response or :outbound_keepalive or nil. */ @@ -214,15 +214,37 @@ /* A pointer to the Ruby OverSIP::SIP::MessageParser instance (required by data_type() in * sip_parser_ruby.c). */ VALUE ruby_sip_parser; } sip_message_parser; +typedef struct sip_uri_parser { + /* Parser stuf. */ + size_t mark; + size_t uri_start; + /* URI parameters. */ + size_t uri_param_key_start; + size_t uri_param_key_len; + size_t uri_param_value_start; + size_t uri_param_value_len; + /* URI scheme type. */ + enum uri_scheme uri_scheme; + /* URI display name is quoted. */ + size_t uri_display_name_quoted; + struct_uri uri; + + /* Will be set to OverSIP::SIP::Uri. */ + VALUE parsed; +} sip_uri_parser; + + + int sip_message_parser_init(sip_message_parser *parser); int sip_message_parser_finish(sip_message_parser *parser); size_t sip_message_parser_execute(sip_message_parser *parser, const char *buffer, size_t len, size_t off); int sip_message_parser_has_error(sip_message_parser *parser); int sip_message_parser_is_finished(sip_message_parser *parser); #define sip_message_parser_nread(parser) (parser)->nread +int sip_uri_parser_execute(sip_uri_parser *parser, const char *buffer, size_t len, VALUE parsed, int allow_name_addr); #endif