Update ooo320-m1
[ooovba.git] / stoc / source / uriproc / UriReference.hxx
blob6fd0b2aa69460992640302466b55f0d3634ad4e0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: UriReference.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_stoc_source_uriproc_UriReference_hxx
32 #define INCLUDED_stoc_source_uriproc_UriReference_hxx
34 #include "com/sun/star/uno/RuntimeException.hpp"
35 #include "osl/mutex.hxx"
36 #include "rtl/ustring.hxx"
37 #include "sal/types.h"
39 namespace rtl { class OUStringBuffer; }
41 namespace stoc { namespace uriproc {
43 class UriReference {
44 public:
45 UriReference(
46 rtl::OUString const & scheme, bool isHierarchical, bool hasAuthority,
47 rtl::OUString const & authority, rtl::OUString const & path,
48 bool hasQuery, rtl::OUString const & query);
50 ~UriReference();
52 rtl::OUString getUriReference()
53 throw (com::sun::star::uno::RuntimeException);
55 sal_Bool isAbsolute() throw (com::sun::star::uno::RuntimeException);
57 rtl::OUString getScheme() throw (com::sun::star::uno::RuntimeException);
59 rtl::OUString getSchemeSpecificPart()
60 throw (com::sun::star::uno::RuntimeException);
62 sal_Bool isHierarchical() throw (com::sun::star::uno::RuntimeException);
64 sal_Bool hasAuthority() throw (com::sun::star::uno::RuntimeException);
66 rtl::OUString getAuthority() throw (com::sun::star::uno::RuntimeException);
68 rtl::OUString getPath() throw (com::sun::star::uno::RuntimeException);
70 sal_Bool hasRelativePath() throw (com::sun::star::uno::RuntimeException);
72 sal_Int32 getPathSegmentCount()
73 throw (com::sun::star::uno::RuntimeException);
75 rtl::OUString getPathSegment(sal_Int32 index)
76 throw (com::sun::star::uno::RuntimeException);
78 sal_Bool hasQuery() throw (com::sun::star::uno::RuntimeException);
80 rtl::OUString getQuery() throw (com::sun::star::uno::RuntimeException);
82 sal_Bool hasFragment() throw (com::sun::star::uno::RuntimeException);
84 rtl::OUString getFragment() throw (com::sun::star::uno::RuntimeException);
86 void setFragment(rtl::OUString const & fragment)
87 throw (com::sun::star::uno::RuntimeException);
89 void clearFragment() throw (com::sun::star::uno::RuntimeException);
91 osl::Mutex m_mutex;
92 rtl::OUString m_scheme;
93 rtl::OUString m_authority;
94 rtl::OUString m_path;
95 rtl::OUString m_query;
96 rtl::OUString m_fragment;
97 bool m_isHierarchical;
98 bool m_hasAuthority;
99 bool m_hasQuery;
100 bool m_hasFragment;
102 private:
103 UriReference(UriReference &); // not implemented
104 void operator =(UriReference); // not implemented
106 void appendSchemeSpecificPart(rtl::OUStringBuffer & buffer) const;
111 #endif