summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-27 18:05:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-27 18:06:27 +0100
commitc36daa01f444ebad799c1cc7a106f1b4bb3c3d12 (patch)
treedf0326a5b76d4b69b5661a57b64f5c6dd5314523 /include/svl
parent92ad689bcb3ad16bd35302e6ff4ee45b872c05a0 (diff)
Introduce INetContentType::scan
...for use in <https://gerrit.libreoffice.org/#/c/8737/> "new methodINetURLObject::getData() for data urls." Change-Id: Id381d7c328153fbea44c0efb80532b2961c6c2b7
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/inettype.hxx26
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);