diff options
Diffstat (limited to 'include/svl')
-rw-r--r-- | include/svl/inettype.hxx | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/include/svl/inettype.hxx b/include/svl/inettype.hxx index a69572b00222..b09261eb0dcd 100644 --- a/include/svl/inettype.hxx +++ b/include/svl/inettype.hxx @@ -253,8 +253,9 @@ public: /** Parse the body of an RFC 2045 Content-Type header field. - @param rMediaType The body of the Content-Type header field. It must - be of the form + @param pBegin The range (that must be valid) from non-null pBegin, + inclusive. to non-null pEnd, exclusive, forms the body of the + Content-Type header field. It must be of the form token "/" token *(";" token "=" (token / quoted-string)) @@ -263,21 +264,28 @@ public: should be US-ASCII, but any Unicode values in the range U+0080..U+FFFF are interpretet 'as appropriate.' - @param rType Returns the type (the first of the above tokens), in US- - ASCII encoding and converted to lower case. - - @param rSubType Returns the sub type (the second of the above + @param pType If not null, returns the type (the first of the above tokens), in US-ASCII encoding and converted to lower case. - @param rParameters If not null, returns the parameters as a list of + @param pSubType If not null, returns the sub-type (the second of the + above tokens), in US-ASCII encoding and converted to lower case. + + @param pParameters If not null, returns the parameters as a list of INetContentTypeParameters (the attributes are in US-ASCII encoding and converted to lower case, the values are in Unicode encoding). If null, only the syntax of the parameters is checked, but they are not returned. - @return True if the syntax of the field body is correct. If false is - returned, none of the output parameters will be modified! + @return Null if the syntax of the field body is incorrect (i.e., does + not start with type and sub-type tokens). Otherwise, a pointer past the + longest valid input prefix. If null is returned, none of the output + parameters will be modified. */ + static sal_Unicode const * scan( + sal_Unicode const *pBegin, sal_Unicode const * pEnd, + OUString * pType = 0, OUString * pSubType = 0, + INetContentTypeParameterList * pParameters = 0); + static bool parse(OUString const & rMediaType, OUString & rType, OUString & rSubType, INetContentTypeParameterList * pParameters = 0); |