26 #include <rtl/ustring.hxx>
27 #include <com/sun/star/uno/Any.hxx>
97 void setClass1(
bool Class1 =
true ) { m_isClass1 = Class1; };
100 void setClass2(
bool Class2 =
true ) { m_isClass2 = Class2; };
103 void setClass3(
bool Class3 =
true ) { m_isClass3 = Class3; };
106 void setHeadAllowed(
bool HeadAllowed =
true ) { m_isHeadAllowed = HeadAllowed; };
109 void setStaleTime(
const sal_uInt32 nStaleTime ) { m_nStaleTime = nStaleTime; };
112 void setRequestedTimeLife(
const sal_uInt32 nRequestedTimeLife ) { m_nRequestedTimeLife = nRequestedTimeLife; };
115 void setURL(
const OUString & sURL ) { m_sURL = sURL; };
118 void setRedirectedURL(
const OUString & sRedirectedURL ) { m_sRedirectedURL = sRedirectedURL; };
120 void setAllowedMethods(
const OUString & aAllowedMethods ) { m_aAllowedMethods = aAllowedMethods; } ;
122 bool isLockAllowed()
const {
return ( m_aAllowedMethods.indexOf(
"LOCK" ) != -1 ); };
124 void setLocked(
bool locked =
true ) { m_isLocked = locked; } ;
137 m_isHeadAllowed =
true;
139 m_aAllowedMethods.clear();
141 m_nRequestedTimeLife = 0;
143 m_sRedirectedURL.clear();
144 m_nHttpResponseStatusCode = 0;
145 m_sHttpResponseStatusText.clear();
156 typedef std::map< OUString, DAVOptions,
167 bool getDAVOptions(
const OUString & rURL, DAVOptions & rDAVOptions );
169 void addDAVOptions( DAVOptions & rDAVOptions,
const sal_uInt32 nLifeTime );
171 void setHeadAllowed(
const OUString & rURL,
bool HeadAllowed =
true );
177 if ( aUrl.getLength() > 1 &&
178 ( ( aUrl.lastIndexOf(
'/' ) + 1 ) == aUrl.getLength() ) )
179 aUrl = aUrl.copy(0, aUrl.getLength() - 1 );
195 const css::uno::Any & v )
196 : operation( o ), name( n ), value( v ) {}
sal_uInt32 getStaleTime() const
bool isHeadAllowed() const
bool getDAVOptions(const OUString &rURL, DAVOptions &rDAVOptions)
void setClass3(bool Class3=true)
void setHttpResponseStatusCode(const sal_uInt16 nHttpResponseStatusCode)
sal_uInt32 m_nStaleTime
target time when this capability becomes stale
void addDAVOptions(DAVOptions &rDAVOptions, const sal_uInt32 nLifeTime)
void setLocked(bool locked=true)
void setURL(const OUString &sURL)
const OUString & getAllowedMethods() const
void setClass1(bool Class1=true)
void setRequestedTimeLife(const sal_uInt32 nRequestedTimeLife)
OUString m_sHttpResponseStatusText
The cached string with the server returned HTTP response status code string, corresponds to m_nHttpRe...
void setHeadAllowed(const OUString &rURL, bool HeadAllowed=true)
OUString m_sRedirectedURL
bool m_isLocked
Internally used to maintain the locked state of the resource, only if it's a Class 2 resource...
sal_uInt16 getHttpResponseStatusCode() const
void setRedirectedURL(const OUString &sRedirectedURL)
const OUString & getURL() const
sal_uInt32 getRequestedTimeLife() const
sal_uInt32 m_nRequestedTimeLife
OUString m_aAllowedMethods
contains the methods allowed on this resource
DAVOptions & operator=(const DAVOptions &rOpts)
bool operator==(const DAVOptions &rOpts) const
const OUString & getHttpResponseStatusText() const
void setHttpResponseStatusText(const OUString &rHttpResponseStatusText)
bool isLockAllowed() const
const OUString & getRedirectedURL() const
void setStaleTime(const sal_uInt32 nStaleTime)
static void normalizeURLLastChar(OUString &aUrl)
remove the last '/' in aUrl, if it exists
bool m_isHeadAllowed
for server that do not implement it
sal_uInt16 m_nHttpResponseStatusCode
The cached HTT response status code. It's 0 if the code was dealt with and there is no need to cache ...
DAVOptionsMap m_aTheCache
std::map< OUString, DAVOptions, std::less< OUString > > DAVOptionsMap
void setClass2(bool Class2=true)
css::uno::Any const value
void setAllowedMethods(const OUString &aAllowedMethods)
void setHeadAllowed(bool HeadAllowed=true)
ProppatchValue(const ProppatchOperation o, const OUString &n, const css::uno::Any &v)
ProppatchOperation const operation
void removeDAVOptions(const OUString &rURL)