summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/webdav/ContentProperties.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/ucp/webdav/ContentProperties.hxx')
-rw-r--r--ucb/source/ucp/webdav/ContentProperties.hxx50
1 files changed, 40 insertions, 10 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx
index 5a21dba08a..fb07ad19a7 100644
--- a/ucb/source/ucp/webdav/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav/ContentProperties.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,13 +71,13 @@ struct hashString
class PropertyValue
{
private:
- ::com::sun::star::uno::Any m_aValue;
+ ::com::sun::star::uno::Any m_aValue;
bool m_bIsCaseSensitive;
public:
PropertyValue()
: m_bIsCaseSensitive( true ) {}
-
+
PropertyValue( const ::com::sun::star::uno::Any & rValue,
bool bIsCaseSensitive )
: m_aValue( rValue),
@@ -85,7 +85,7 @@ public:
bool isCaseSensitive() const { return m_bIsCaseSensitive; }
const ::com::sun::star::uno::Any & value() const { return m_aValue; }
-
+
};
typedef std::hash_map
@@ -102,10 +102,12 @@ struct DAVResource;
class ContentProperties
{
public:
- ContentProperties( const DAVResource& rResource );
+ ContentProperties();
+
+ ContentProperties( const DAVResource& rResource );
// Mini props for transient contents.
- ContentProperties( const rtl::OUString & rTitle, sal_Bool bFolder );
+ ContentProperties( const rtl::OUString & rTitle, sal_Bool bFolder );
// Micro props for non-existing contents.
ContentProperties( const rtl::OUString & rTitle );
@@ -167,10 +169,10 @@ public:
void addProperty( const rtl::OUString & rName,
const com::sun::star::uno::Any & rValue,
bool bIsCaseSensitive );
-
+
// overwrites probably existing entry.
void addProperty( const DAVPropertyValue & rProp );
-
+
bool isTrailingSlash() const { return m_bTrailingSlash; }
const rtl::OUString & getEscapedTitle() const { return m_aEscapedTitle; }
@@ -181,7 +183,7 @@ public:
{ return m_xProps; }
private:
- ::rtl::OUString m_aEscapedTitle; // escaped Title
+ ::rtl::OUString m_aEscapedTitle;
std::auto_ptr< PropertyValueMap > m_xProps;
bool m_bTrailingSlash;
@@ -192,6 +194,34 @@ private:
const PropertyValue * get( const rtl::OUString & rName ) const;
};
-}
+class CachableContentProperties
+{
+private:
+ ContentProperties m_aProps;
+
+ CachableContentProperties & operator=( const CachableContentProperties & ); // n.i.
+ CachableContentProperties( const CachableContentProperties & ); // n.i.
+
+public:
+ CachableContentProperties( const ContentProperties & rProps );
+
+ void addProperties( const ContentProperties & rProps );
+
+ void addProperties( const std::vector< DAVPropertyValue > & rProps );
+
+ bool containsAllNames(
+ const com::sun::star::uno::Sequence<
+ com::sun::star::beans::Property >& rProps,
+ std::vector< rtl::OUString > & rNamesNotContained ) const
+ { return m_aProps.containsAllNames( rProps, rNamesNotContained ); }
+
+ const com::sun::star::uno::Any &
+ getValue( const rtl::OUString & rName ) const
+ { return m_aProps.getValue( rName ); }
+
+ operator const ContentProperties & () const { return m_aProps; }
+};
+
+} // namespace webdav_ucp
#endif /* !_WEBDAV_UCP_CONTENTPROPERTIES_HXX */