1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_NEONURI_HXX
29 #define INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_NEONURI_HXX
31 #include <config_lgpl.h>
33 #include <rtl/ustring.hxx>
34 #include <DAVException.hxx>
39 #define DEFAULT_HTTP_PORT 80
40 #define DEFAULT_HTTPS_PORT 443
41 #define DEFAULT_FTP_PORT 21
43 // A URI implementation for use with the neon/expat library
54 void init( const OString
& rUri
, const ne_uri
* pUri
);
58 NeonUri( const OUString
& inUri
) throw ( DAVException
);
59 NeonUri( const ne_uri
* inUri
) throw ( DAVException
);
62 bool operator== ( const NeonUri
& rOther
) const;
63 bool operator!= ( const NeonUri
& rOther
) const
64 { return !operator==( rOther
); }
66 const OUString
& GetURI() const
68 const OUString
& GetScheme() const
70 const OUString
& GetUserInfo() const
71 { return mUserInfo
; };
72 const OUString
& GetHost() const
73 { return mHostName
; };
74 sal_Int32
GetPort() const
76 const OUString
& GetPath() const
79 OUString
GetPathBaseName() const;
81 OUString
GetPathBaseNameUnescaped() const;
83 void SetScheme (const OUString
& scheme
)
84 { mScheme
= scheme
; calculateURI (); };
86 void AppendPath (const OUString
& rPath
);
88 static OUString
escapeSegment( const OUString
& segment
);
89 static OUString
unescape( const OUString
& string
);
91 // "host:port", omit ":port" for port 80 and 443
92 static OUString
makeConnectionEndPointString(
93 const OUString
& rHostName
,
95 OUString
makeConnectionEndPointString() const
96 { return makeConnectionEndPointString( GetHost(), GetPort() ); }
99 } // namespace webdav_ucp
101 #endif // INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_NEONURI_HXX
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */