LibreOffice Module stoc (master) 1
UriReference.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_STOC_SOURCE_URIPROC_URIREFERENCE_HXX
21#define INCLUDED_STOC_SOURCE_URIPROC_URIREFERENCE_HXX
22
23#include <mutex>
24#include <rtl/ustring.hxx>
25#include <sal/types.h>
26#include <rtl/ustrbuf.hxx>
27
28namespace stoc::uriproc {
29
31public:
33 OUString scheme, bool hasAuthority,
34 OUString const & authority, OUString path,
35 bool hasQuery, OUString const & query);
36
38
40 OUString getUriReference();
41
43 bool isAbsolute() const;
44
46 const OUString& getScheme() const { return m_scheme;}
47
49 OUString getSchemeSpecificPart();
50
52 bool isHierarchical();
53
55 bool hasAuthority() const;
56
58 const OUString& getAuthority() const;
59
61 OUString getPath();
62
64 bool hasRelativePath();
65
67 sal_Int32 getPathSegmentCount();
68
70 OUString getPathSegment(sal_Int32 index);
71
73 bool hasQuery() const;
74
76 const OUString& getQuery() const;
77
79 bool hasFragment();
80
82 OUString getFragment();
83
85 void setFragment(OUString const & fragment);
86
88 void clearFragment();
89
90 std::mutex m_mutex;
91 OUString m_path;
92
93private:
94 UriReference(UriReference const &) = delete;
95 void operator =(UriReference const &) = delete;
96
97 void appendSchemeSpecificPart(OUStringBuffer & buffer) const;
98
99 OUString m_scheme;
100 OUString m_authority;
101 OUString m_query;
102 OUString m_fragment;
106};
107
108}
109
110#endif
111
112/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void operator=(UriReference const &)=delete
const OUString & getAuthority() const
const OUString & getScheme() const
UriReference(UriReference const &)=delete
void setFragment(OUString const &fragment)
UriReference(OUString scheme, bool hasAuthority, OUString const &authority, OUString path, bool hasQuery, OUString const &query)
void appendSchemeSpecificPart(OUStringBuffer &buffer) const
OUString getPathSegment(sal_Int32 index)
const OUString & getQuery() const
store_handle_type *SAL_CALL query(OStoreObject *pHandle, store_handle_type *)