1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <rtl/ustring.hxx>
26 #define JOBURL_EVENT_STR "event="
27 #define JOBURL_EVENT_LEN 6
29 #define JOBURL_ALIAS_STR "alias="
30 #define JOBURL_ALIAS_LEN 6
32 #define JOBURL_SERVICE_STR "service="
33 #define JOBURL_SERVICE_LEN 8
35 #define JOBURL_PART_SEPARATOR ';'
36 #define JOBURL_PARTARGS_SEPARATOR ','
39 @short can be used to parse, validate and work with job URL's
40 @descr Job URLs are specified by the following syntax:
41 vnd.sun.star.job:{[event=<name>]|[alias=<name>]|[service=<name>]}
42 This class can analyze this structure and separate it into his different parts.
43 After doing that these parts are accessible by the methods of this class.
53 possible states of a job URL
54 Note: These values are used in combination. So they must be
59 /// mark a job URL as not valid
73 /** knows the state of this URL instance */
74 sal_uInt32 m_eRequest
;
76 /** holds the event part of a job URL */
79 /** holds the alias part of a job URL */
82 /** holds the service part of a job URL */
89 JobURL ( const OUString
& sURL
);
90 bool isValid ( ) const;
91 bool getEvent ( OUString
& sEvent
) const;
92 bool getAlias ( OUString
& sAlias
) const;
93 bool getService ( OUString
& sService
) const;
99 static bool implst_split( const OUString
& sPart
,
100 const char* pPartIdentifier
,
101 sal_Int32 nPartLength
,
102 OUString
& rPartValue
,
103 OUString
& rPartArguments
);
106 } // namespace framework
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */