[Libreoffice-commits] .: 2 commits - libcmis/libcmis-0.2.3-allowable-actions.patch libcmis/libcmis-0.2.3-backports.patch libcmis/makefile.mk ucb/Library_ucpcmis1.mk ucb/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Jul 9 08:39:11 PDT 2012


 libcmis/libcmis-0.2.3-allowable-actions.patch |  284 ----
 libcmis/libcmis-0.2.3-backports.patch         | 1492 ++++++++++++++++++++++++++
 libcmis/makefile.mk                           |    2 
 ucb/Library_ucpcmis1.mk                       |    3 
 ucb/source/ucp/cmis/cmis_content.cxx          |  106 -
 ucb/source/ucp/cmis/cmis_content.hxx          |   12 
 ucb/source/ucp/cmis/cmis_datasupplier.cxx     |  132 --
 ucb/source/ucp/cmis/cmis_datasupplier.hxx     |   12 
 ucb/source/ucp/cmis/cmis_provider.cxx         |   21 
 ucb/source/ucp/cmis/cmis_resultset.cxx        |    6 
 ucb/source/ucp/cmis/cmis_resultset.hxx        |    8 
 ucb/source/ucp/cmis/cmis_url.hxx              |    2 
 12 files changed, 1602 insertions(+), 478 deletions(-)

New commits:
commit 4cb0143327155b6678989a3fe63f11df5014f3a5
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jul 9 17:30:11 2012 +0200

    CMIS UCP: Added support for Binding URL and Repository as folders
    
    This feature needed to change quite some code in the way children are
    fetched in CMIS UCP to avoid running several times the same HTTP
    requests.
    
    The new URLs will find the following scheme:
     + Children of vnd.libreoffice.cmis+atom://admin@http-encoded-binding-url-no-repoid/
       are the repositories listed by the binding URL
     + Children of vnd.libreoffice.cmis+atom://admin@http-encoded-binding-url-no-repoid/repoid
       are the root folder of the repository
    
    Change-Id: I405d88c82e6fc9f1110a84165a151257c4ce60db

diff --git a/ucb/Library_ucpcmis1.mk b/ucb/Library_ucpcmis1.mk
index 635aaa2..1fb1226 100644
--- a/ucb/Library_ucpcmis1.mk
+++ b/ucb/Library_ucpcmis1.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Library_set_componentfile,ucpcmis1,ucb/source/ucp/cmis/ucpcmis1
 $(eval $(call gb_Library_use_sdk_api,ucpcmis1))
 
 $(eval $(call gb_Library_use_libraries,ucpcmis1,\
+	comphelper \
 	cppu \
 	cppuhelper \
 	sal \
@@ -49,7 +50,9 @@ $(eval $(call gb_Library_use_externals,ucpcmis1,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,ucpcmis1,\
+	ucb/source/ucp/cmis/auth_provider \
 	ucb/source/ucp/cmis/cmis_content \
+	ucb/source/ucp/cmis/cmis_repo_content \
 	ucb/source/ucp/cmis/cmis_datasupplier \
 	ucb/source/ucp/cmis/cmis_provider \
 	ucb/source/ucp/cmis/cmis_resultset \
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 057b3d6..f046462 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -57,8 +57,8 @@
 #include <ucbhelper/std_inputstream.hxx>
 #include <ucbhelper/std_outputstream.hxx>
 #include <ucbhelper/propertyvalueset.hxx>
-#include <ucbhelper/simpleauthenticationrequest.hxx>
 
+#include "auth_provider.hxx"
 #include "cmis_content.hxx"
 #include "cmis_provider.hxx"
 #include "cmis_resultset.hxx"
@@ -71,64 +71,6 @@ using namespace std;
 
 namespace
 {
-    class AuthProvider : public libcmis::AuthProvider
-    {
-        const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment>& m_xEnv;
-        rtl::OUString m_sUrl;
-        rtl::OUString m_sBindingUrl;
-
-        public:
-            AuthProvider ( const com::sun::star::uno::Reference<
-                                   com::sun::star::ucb::XCommandEnvironment>& xEnv,
-                           rtl::OUString sUrl,
-                           rtl::OUString sBindingUrl ):
-                m_xEnv( xEnv ), m_sUrl( sUrl ), m_sBindingUrl( sBindingUrl ) { }
-
-            bool authenticationQuery( string& username, string& password );
-    };
-
-    bool AuthProvider::authenticationQuery( string& username, string& password )
-    {
-        if ( m_xEnv.is() )
-        {
-            uno::Reference< task::XInteractionHandler > xIH
-                = m_xEnv->getInteractionHandler();
-
-            if ( xIH.is() )
-            {
-                rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
-                    = new ucbhelper::SimpleAuthenticationRequest(
-                        m_sUrl, m_sBindingUrl, ::rtl::OUString(),
-                        STD_TO_OUSTR( username ),
-                        STD_TO_OUSTR( password ),
-                        ::rtl::OUString(), true, false );
-                xIH->handle( xRequest.get() );
-
-                rtl::Reference< ucbhelper::InteractionContinuation > xSelection
-                    = xRequest->getSelection();
-
-                if ( xSelection.is() )
-                {
-                    // Handler handled the request.
-                    uno::Reference< task::XInteractionAbort > xAbort(
-                        xSelection.get(), uno::UNO_QUERY );
-                    if ( !xAbort.is() )
-                    {
-                        const rtl::Reference<
-                            ucbhelper::InteractionSupplyAuthentication > & xSupp
-                            = xRequest->getAuthenticationSupplier();
-
-                        username = OUSTR_TO_STDSTR( xSupp->getUserName() );
-                        password = OUSTR_TO_STDSTR( xSupp->getPassword() );
-
-                        return true;
-                    }
-                }
-            }
-        }
-        return false;
-    }
-
     util::DateTime lcl_boostToUnoTime( boost::posix_time::ptime boostTime )
     {
         util::DateTime unoTime;
@@ -152,11 +94,13 @@ namespace
 namespace cmis
 {
     Content::Content( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
-        ContentProvider *pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier)
+        ContentProvider *pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier,
+        libcmis::ObjectPtr pObject )
             throw ( ucb::ContentCreationException )
         : ContentImplHelper( rxSMgr, pProvider, Identifier ),
         m_pProvider( pProvider ),
         m_pSession( NULL ),
+        m_pObject( pObject ),
         m_bTransient( false )
     {
         // Split the URL into bits
@@ -459,12 +403,6 @@ namespace cmis
         return bExists;
     }
 
-    void Content::queryChildren( ContentRefList& /*rChildren*/ )
-    {
-        SAL_INFO( "cmisucp", "TODO - Content::queryChildren()" );
-        // TODO Implement me
-    }
-
     uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand,
         const uno::Reference< ucb::XCommandEnvironment > & xEnv )
             throw( uno::Exception )
@@ -1210,6 +1148,42 @@ namespace cmis
         }
     }
 
+    list< uno::Reference< ucb::XContent > > Content::getChildren( )
+    {
+        list< uno::Reference< ucb::XContent > > results;
+        SAL_INFO( "cmisucp", "Content::getChildren() " << m_sURL );
+
+        libcmis::Folder* pFolder = dynamic_cast< libcmis::Folder* >( getObject( ).get( ) );
+        if ( NULL != pFolder )
+        {
+            // Get the children from pObject
+            try
+            {
+                vector< libcmis::ObjectPtr > children = pFolder->getChildren( );
+
+                // Loop over the results
+                for ( vector< libcmis::ObjectPtr >::iterator it = children.begin();
+                        it != children.end(); ++it )
+                {
+                    // TODO Cache the objects
+
+                    URL aUrl( m_sURL );
+                    aUrl.setObjectPath( m_sObjectPath + STD_TO_OUSTR( ( *it )->getName( ) ) );
+                    uno::Reference< ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( aUrl.asString( ) );
+                    uno::Reference< ucb::XContent > xContent = new Content( m_xSMgr, m_pProvider, xId, *it );
+
+                    results.push_back( xContent );
+                }
+            }
+            catch ( const libcmis::Exception& e )
+            {
+                SAL_INFO( "cmisucp", "Exception thrown: " << e.what() );
+            }
+        }
+
+        return results;
+    }
+
     void Content::setCmisProperty( std::string sName, std::string sValue )
     {
         if ( m_pObjectType.get( ) )
diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx
index 28ff5cd..0c24b6a 100644
--- a/ucb/source/ucp/cmis/cmis_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_content.hxx
@@ -30,6 +30,7 @@
 #define CMIS_CONTENT_HXX
 
 #include "cmis_url.hxx"
+#include "children_provider.hxx"
 
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/io/XOutputStream.hpp>
@@ -64,7 +65,9 @@ namespace cmis
 #define CMIS_FOLDER_TYPE "application/vnd.sun.staroffice.cmis-folder"
 
 class ContentProvider;
-class Content : public ::ucbhelper::ContentImplHelper, public com::sun::star::ucb::XContentCreator
+class Content : public ::ucbhelper::ContentImplHelper,
+                public com::sun::star::ucb::XContentCreator,
+                public ChildrenProvider
 {
 private:
     ContentProvider*       m_pProvider;
@@ -96,8 +99,6 @@ private:
     typedef rtl::Reference< Content > ContentRef;
     typedef std::list< ContentRef > ContentRefList;
 
-    void queryChildren( ContentRefList& rChildren );
-
     com::sun::star::uno::Any open(const com::sun::star::ucb::OpenCommandArgument2 & rArg,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv )
             throw( com::sun::star::uno::Exception );
@@ -131,7 +132,8 @@ private:
 public:
     Content( const com::sun::star::uno::Reference<
         com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
-        const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier)
+        const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
+        libcmis::ObjectPtr pObject = libcmis::ObjectPtr( ) )
             throw ( com::sun::star::ucb::ContentCreationException );
 
     Content( const com::sun::star::uno::Reference<
@@ -189,6 +191,8 @@ public:
         queryCreatableContentsInfo( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv )
                 throw( com::sun::star::uno::RuntimeException );
 
+    virtual std::list< com::sun::star::uno::Reference< com::sun::star::ucb::XContent > > getChildren( );
+
     libcmis::ObjectPtr getObject( ) throw ( libcmis::Exception );
 };
 
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index c459dde..5d07574 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -29,8 +29,8 @@ namespace cmis
     typedef std::vector< ResultListEntry* > ResultList;
 
     DataSupplier::DataSupplier( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
-        const uno::Reference< ::cmis::Content >& rContent, sal_Int32 nOpenMode )
-        : mxContent(rContent), m_xSMgr(rxSMgr), mnOpenMode(nOpenMode), mbCountFinal(false)
+        ChildrenProvider* pChildrenProvider, sal_Int32 nOpenMode )
+        : m_pChildrenProvider( pChildrenProvider ), m_xSMgr(rxSMgr), mnOpenMode(nOpenMode), mbCountFinal(false)
     {
     }
 
@@ -39,132 +39,52 @@ namespace cmis
         if ( mbCountFinal )
             return true;
 
-        libcmis::ObjectPtr pObject = mxContent->getObject();
-        libcmis::Folder* pFolder = dynamic_cast< libcmis::Folder* >( pObject.get( ) );
-        if ( NULL != pFolder )
-        {
-            // Get the children from pObject
-            try
-            {
-                vector< libcmis::ObjectPtr > children = pFolder->getChildren( );
-
-                // Loop over the results and filter them
-                for ( vector< libcmis::ObjectPtr >::iterator it = children.begin();
-                        it != children.end(); ++it )
-                {
-                    bool bIsFolder = ( *it )->getBaseType( ) == "cmis:folder";
-                    if ( ( mnOpenMode == ucb::OpenMode::FOLDERS && bIsFolder ) ||
-                         ( mnOpenMode == ucb::OpenMode::DOCUMENTS && !bIsFolder ) ||
-                         ( mnOpenMode == ucb::OpenMode::ALL ) )
-                    {
-                        maResults.push_back( new ResultListEntry( *it ) );
-                    }
-                }
-                mbCountFinal = sal_True;
+        list< uno::Reference< ucb::XContent > > aChildren = m_pChildrenProvider->getChildren( );
 
-                return true;
-            }
-            catch ( const libcmis::Exception& e )
+        // Loop over the results and filter them
+        for ( list< uno::Reference< ucb::XContent > >::iterator it = aChildren.begin();
+                it != aChildren.end(); ++it )
+        {
+            rtl::OUString sContentType = ( *it )->getContentType( );
+            bool bIsFolder = sContentType != CMIS_FILE_TYPE;
+            if ( ( mnOpenMode == ucb::OpenMode::FOLDERS && bIsFolder ) ||
+                 ( mnOpenMode == ucb::OpenMode::DOCUMENTS && !bIsFolder ) ||
+                 ( mnOpenMode == ucb::OpenMode::ALL ) )
             {
-                SAL_INFO( "cmisucp", "Exception thrown: " << e.what() );
-                return false;
+                maResults.push_back( new ResultListEntry( *it ) );
             }
         }
+        mbCountFinal = sal_True;
 
-        return false;
+        return true;
     }
 
     DataSupplier::~DataSupplier()
     {
+        while ( maResults.size( ) > 0 )
+        {
+            ResultListEntry* back = maResults.back( );
+            maResults.pop_back( );
+            delete( back );
+        }
     }
 
     ::rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
     {
-        if ( nIndex < maResults.size() )
-        {
-            ::rtl::OUString aId = maResults[ nIndex ]->aId;
-            if ( aId.getLength() )
-            {
-                // Already cached.
-                return aId;
-            }
-        }
-
-        if ( getResult( nIndex ) )
-        {
-            string sObjectPath;
-            vector< string > paths = maResults[nIndex]->pObject->getPaths( );
-            if ( !paths.empty( ) )
-                sObjectPath = paths.front( );
-            else
-            {
-                // Handle the unfiled objects with their id...
-                // They manage to sneak here if we don't have the permission to get the object
-                // parents (and then the path)
-                sObjectPath += "#" + maResults[nIndex]->pObject->getId( );
-            }
-
-            // Get the URL from the Path
-            URL aUrl( mxContent->getIdentifier( )->getContentIdentifier( ) );
-            aUrl.setObjectPath( STD_TO_OUSTR( sObjectPath ) );
-            rtl::OUString aId = aUrl.asString( );
-
-            maResults[ nIndex ]->aId = aId;
-            return aId;
-        }
-
-        return ::rtl::OUString();
+        return queryContentIdentifier( nIndex )->getContentIdentifier( );
     }
 
     uno::Reference< ucb::XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
     {
-        if ( nIndex < maResults.size() )
-        {
-            uno::Reference< ucb::XContentIdentifier > xId = maResults[ nIndex ]->xId;
-            if ( xId.is() )
-            {
-                // Already cached.
-                return xId;
-            }
-        }
-
-        ::rtl::OUString aId = queryContentIdentifierString( nIndex );
-        if ( aId.getLength() )
-        {
-            uno::Reference< ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( aId );
-            maResults[ nIndex ]->xId = xId;
-            return xId;
-        }
-
-        return uno::Reference< ucb::XContentIdentifier >();
+        return queryContent( nIndex )->getIdentifier( );
     }
 
     uno::Reference< ucb::XContent > DataSupplier::queryContent( sal_uInt32 nIndex )
     {
-        if ( nIndex < maResults.size() )
-        {
-            uno::Reference< ucb::XContent > xContent = maResults[ nIndex ]->xContent;
-            if ( xContent.is() )
-            {
-                // Already cached.
-                return xContent;
-            }
-        }
+        if ( nIndex > maResults.size() )
+            getData( );
 
-        uno::Reference< ucb::XContentIdentifier > xId = queryContentIdentifier( nIndex );
-        if ( xId.is() )
-        {
-            try
-            {
-                uno::Reference< ucb::XContent > xContent = mxContent->getProvider()->queryContent( xId );
-                maResults[ nIndex ]->xContent = xContent;
-                return xContent;
-            }
-            catch ( ucb::IllegalIdentifierException& )
-            {
-            }
-        }
-        return uno::Reference< ucb::XContent >();
+        return maResults[ nIndex ]->xContent;
     }
 
     sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.hxx b/ucb/source/ucp/cmis/cmis_datasupplier.hxx
index 14ad404..7a3b420 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.hxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.hxx
@@ -14,7 +14,7 @@
 
 #include <ucbhelper/resultset.hxx>
 
-#include "cmis_content.hxx"
+#include "children_provider.hxx"
 
 namespace cmis
 {
@@ -23,13 +23,10 @@ namespace cmis
 
     struct ResultListEntry
     {
-        ::rtl::OUString aId;
-        com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > xId;
         com::sun::star::uno::Reference< com::sun::star::ucb::XContent > xContent;
         com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > xRow;
-        libcmis::ObjectPtr pObject;
 
-        ResultListEntry( libcmis::ObjectPtr pObj ) : pObject( pObj )
+        ResultListEntry( com::sun::star::uno::Reference< com::sun::star::ucb::XContent > xCnt ) : xContent( xCnt )
         {
         }
 
@@ -43,7 +40,7 @@ namespace cmis
     class DataSupplier : public ucbhelper::ResultSetDataSupplier
     {
         private:
-            com::sun::star::uno::Reference< ::cmis::Content > mxContent;
+            ChildrenProvider* m_pChildrenProvider;
             com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
             sal_Int32 mnOpenMode;
             bool mbCountFinal;
@@ -52,7 +49,8 @@ namespace cmis
 
         public:
             DataSupplier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
-                const com::sun::star::uno::Reference< Content >& rContent, sal_Int32 nOpenMode );
+                ChildrenProvider* pChildrenProvider, sal_Int32 nOpenMode );
+
             virtual ~DataSupplier();
 
             virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex );
diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx
index f65a1ca..14a3b81 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -26,13 +26,15 @@
  * instead of those above.
  */
 
+#include <stdio.h>
+
 #include <ucbhelper/contentidentifier.hxx>
 #include <ucbhelper/contenthelper.hxx>
 #include <com/sun/star/ucb/ContentCreationException.hpp>
-#include "cmis_provider.hxx"
-#include "cmis_content.hxx"
 
-#include <stdio.h>
+#include "cmis_content.hxx"
+#include "cmis_provider.hxx"
+#include "cmis_repo_content.hxx"
 
 using namespace com::sun::star;
 
@@ -54,8 +56,17 @@ ContentProvider::queryContent(
 
     try
     {
-        xContent = new ::cmis::Content( m_xSMgr, this, Identifier );
-        registerNewContent( xContent );
+        URL aUrl( Identifier->getContentIdentifier( ) );
+        if ( aUrl.getRepositoryId( ).isEmpty( ) )
+        {
+            xContent = new RepoContent( m_xSMgr, this, Identifier );
+            registerNewContent( xContent );
+        }
+        else
+        {
+            xContent = new Content( m_xSMgr, this, Identifier );
+            registerNewContent( xContent );
+        }
     }
     catch ( com::sun::star::ucb::ContentCreationException const & )
     {
diff --git a/ucb/source/ucp/cmis/cmis_resultset.cxx b/ucb/source/ucp/cmis/cmis_resultset.cxx
index b79b5f1..86ed3ca 100644
--- a/ucb/source/ucp/cmis/cmis_resultset.cxx
+++ b/ucb/source/ucp/cmis/cmis_resultset.cxx
@@ -18,11 +18,11 @@ namespace cmis
 {
     DynamicResultSet::DynamicResultSet(
         const Reference< XMultiServiceFactory >& rxSMgr,
-        const Reference< Content >& rxContent,
+        ChildrenProvider* pChildrenProvider,
         const OpenCommandArgument2& rCommand,
         const Reference< XCommandEnvironment >& rxEnv ) :
             ResultSetImplHelper( rxSMgr, rCommand ),
-            m_xContent( rxContent ),
+            m_pChildrenProvider( pChildrenProvider ),
             m_xEnv( rxEnv )
     {
     }
@@ -31,7 +31,7 @@ namespace cmis
     {
         m_xResultSet1 = new ::ucbhelper::ResultSet(
             m_xSMgr, m_aCommand.Properties,
-            new DataSupplier( m_xSMgr, m_xContent, m_aCommand.Mode ), m_xEnv );
+            new DataSupplier( m_xSMgr, m_pChildrenProvider, m_aCommand.Mode ), m_xEnv );
     }
 
     void DynamicResultSet::initDynamic()
diff --git a/ucb/source/ucp/cmis/cmis_resultset.hxx b/ucb/source/ucp/cmis/cmis_resultset.hxx
index bd40a8c..7d7c375 100644
--- a/ucb/source/ucp/cmis/cmis_resultset.hxx
+++ b/ucb/source/ucp/cmis/cmis_resultset.hxx
@@ -12,12 +12,14 @@
 
 #include <ucbhelper/resultsethelper.hxx>
 
+#include "children_provider.hxx"
+
 namespace cmis
 {
 
     class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper
     {
-        com::sun::star::uno::Reference< Content > m_xContent;
+        ChildrenProvider* m_pChildrenProvider;
         com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xEnv;
 
         private:
@@ -25,12 +27,14 @@ namespace cmis
             virtual void initDynamic();
 
         public:
+
             DynamicResultSet(
                     const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
-                    const com::sun::star::uno::Reference< Content >& rxContent,
+                    ChildrenProvider* pChildrenProvider,
                     const com::sun::star::ucb::OpenCommandArgument2& rCommand,
                     const com::sun::star::uno::Reference<
                     com::sun::star::ucb::XCommandEnvironment >& rxEnv );
+
     };
 }
 
diff --git a/ucb/source/ucp/cmis/cmis_url.hxx b/ucb/source/ucp/cmis/cmis_url.hxx
index 3d41690..aa3d93c 100644
--- a/ucb/source/ucp/cmis/cmis_url.hxx
+++ b/ucb/source/ucp/cmis/cmis_url.hxx
@@ -54,6 +54,8 @@ namespace cmis
             rtl::OUString& getObjectId( );
             rtl::OUString& getBindingUrl( );
             rtl::OUString& getRepositoryId( );
+            rtl::OUString& getUsername( ) { return m_sUser; }
+            rtl::OUString& getPassword( ) { return m_sPass; }
             void setObjectPath( rtl::OUString sPath );
 
             rtl::OUString asString( );
commit 5db77d15790b154d7a066afabd73ab89d48915d6
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Fri Jul 6 12:15:09 2012 +0200

    libcmis: changed API to get all repositories infos, not just their ID
    
    This change will not be pushed in upstream libcmis-0.2 branch, so I
    backported it here as it will be needed to show a list of repositories
    in the filepicker UI somehow.
    
    Change-Id: I5427e96ddf548c14d2a3b6988e4352c832ac7a0b

diff --git a/libcmis/libcmis-0.2.3-allowable-actions.patch b/libcmis/libcmis-0.2.3-allowable-actions.patch
deleted file mode 100644
index 8cd84ab..0000000
--- a/libcmis/libcmis-0.2.3-allowable-actions.patch
+++ /dev/null
@@ -1,284 +0,0 @@
-diff -ur libcmis-0.2.3/src/libcmis/allowable-actions.cxx misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.cxx
---- libcmis-0.2.3/src/libcmis/allowable-actions.cxx	2012-07-03 16:47:28.063183460 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.cxx	2012-07-03 16:48:24.178187938 +0200
-@@ -28,14 +28,122 @@
- 
- #include "allowable-actions.hxx"
- #include "object.hxx"
-+#include "xml-utils.hxx"
- 
- using namespace std;
- 
- namespace libcmis
- {
--    AllowableActions::AllowableActions( ) :
-+    ObjectAction::ObjectAction( xmlNodePtr node ) :
-+        m_type( ObjectAction::DeleteObject ),
-+        m_enabled( false ),
-+        m_valid( false )
-+    {
-+        try
-+        {
-+            m_type = parseType( string( ( char* ) node->name ) );
-+            m_valid = true;
-+        }
-+        catch ( const Exception& e )
-+        {
-+            m_valid = false;
-+        }
-+
-+        // Invalid xsd:bool will be mean false... not sure what the spec says
-+        try
-+        {
-+            xmlChar* content = xmlNodeGetContent( node );
-+            m_enabled = parseBool( string( ( char* )content ) );
-+            xmlFree( content );
-+        }
-+        catch ( const Exception& e )
-+        {
-+            m_enabled = false;
-+        }
-+    }
-+
-+    ObjectAction::Type ObjectAction::parseType( string type ) throw ( Exception )
-+    {
-+        Type value = DeleteObject;
-+        if ( type == "canDeleteObject" )
-+            value = DeleteObject;
-+        else if ( type == "canUpdateProperties" )
-+            value = UpdateProperties;
-+        else if ( type == "canGetFolderTree" )
-+            value = GetFolderTree;
-+        else if ( type == "canGetProperties" )
-+            value = GetProperties;
-+        else if ( type == "canGetObjectRelationships" )
-+            value = GetObjectRelationships;
-+        else if ( type == "canGetObjectParents" )
-+            value = GetObjectParents;
-+        else if ( type == "canGetFolderParent" )
-+            value = GetFolderParent;
-+        else if ( type == "canGetDescendants" )
-+            value = GetDescendants;
-+        else if ( type == "canMoveObject" )
-+            value = MoveObject;
-+        else if ( type == "canDeleteContentStream" )
-+            value = DeleteContentStream;
-+        else if ( type == "canCheckOut" )
-+            value = CheckOut;
-+        else if ( type == "canCancelCheckOut" )
-+            value = CancelCheckOut;
-+        else if ( type == "canCheckIn" )
-+            value = CheckIn;
-+        else if ( type == "canSetContentStream" )
-+            value = SetContentStream;
-+        else if ( type == "canGetAllVersions" )
-+            value = GetAllVersions;
-+        else if ( type == "canAddObjectToFolder" )
-+            value = AddObjectToFolder;
-+        else if ( type == "canRemoveObjectFromFolder" )
-+            value = RemoveObjectFromFolder;
-+        else if ( type == "canGetContentStream" )
-+            value = GetContentStream;
-+        else if ( type == "canApplyPolicy" )
-+            value = ApplyPolicy;
-+        else if ( type == "canGetAppliedPolicies" )
-+            value = GetAppliedPolicies;
-+        else if ( type == "canRemovePolicy" )
-+            value = RemovePolicy;
-+        else if ( type == "canGetChildren" )
-+            value = GetChildren;
-+        else if ( type == "canCreateDocument" )
-+            value = CreateDocument;
-+        else if ( type == "canCreateFolder" )
-+            value = CreateFolder;
-+        else if ( type == "canCreateRelationship" )
-+            value = CreateRelationship;
-+        else if ( type == "canDeleteTree" )
-+            value = DeleteTree;
-+        else if ( type == "canGetRenditions" )
-+            value = GetRenditions;
-+        else if ( type == "canGetACL" )
-+            value = GetACL;
-+        else if ( type == "canApplyACL" )
-+            value = ApplyACL;
-+        else
-+            throw Exception( "Invalid AllowableAction type: " + type );
-+        
-+        return value;
-+    }
-+
-+    AllowableActions::AllowableActions( xmlNodePtr node ) :
-         m_states( )
-     {
-+        for ( xmlNodePtr child = node->children; child; child = child->next )
-+        {
-+            // Check for non text children... "\n" is also a node ;)
-+            if ( !xmlNodeIsText( child ) )
-+            {
-+                ObjectAction action( child );
-+                if ( action.isValid( ) )
-+                    m_states.insert( pair< libcmis::ObjectAction::Type, bool >(
-+                                action.getType( ),
-+                                action.isEnabled() ) );
-+            }
-+        }
-     }
- 
-     AllowableActions::AllowableActions( const AllowableActions& copy ) :
-diff -ur libcmis-0.2.3/src/libcmis/allowable-actions.hxx misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.hxx
---- libcmis-0.2.3/src/libcmis/allowable-actions.hxx	2012-07-03 16:47:28.018183456 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.hxx	2012-07-03 16:48:24.178187938 +0200
-@@ -29,6 +29,11 @@
- #define _ALLOWABLE_ACTIONS_HXX_
- 
- #include <map>
-+#include <string>
-+
-+#include <libxml/tree.h>
-+
-+#include "exception.hxx"
- 
- namespace libcmis
- {
-@@ -37,8 +42,6 @@
-     class ObjectAction
-     {
-         public:
--            virtual ~ObjectAction( ){ }
--
-             enum Type
-             {
-                 DeleteObject,
-@@ -71,6 +74,25 @@
-                 GetACL,
-                 ApplyACL
-             };
-+
-+        private:
-+            Type m_type;
-+            bool m_enabled;
-+            bool m_valid;
-+
-+        public:
-+            ObjectAction( xmlNodePtr node );
-+            virtual ~ObjectAction( ){ }
-+
-+            Type getType( ) { return m_type; }
-+            bool isEnabled( ) { return m_enabled; }
-+            bool isValid( ) { return m_valid; }
-+
-+            /** Parses the permission name into one of the enum values or throws
-+                an exception for invalid input strings.
-+              */
-+            static Type parseType( std::string type ) throw ( Exception );
-+
-     };
- 
-     /** Class providing access to the allowed actions on an object.
-@@ -81,7 +103,7 @@
-             std::map< ObjectAction::Type, bool > m_states;
- 
-         public:
--            AllowableActions( );
-+            AllowableActions( xmlNodePtr node );
-             AllowableActions( const AllowableActions& copy );
-             virtual ~AllowableActions( );
- 
-Only in libcmis-0.2.3/src/libcmis: atom-allowable-actions.cxx
-Only in libcmis-0.2.3/src/libcmis: atom-allowable-actions.hxx
-diff -ur libcmis-0.2.3/src/libcmis/atom-document.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-document.hxx
---- libcmis-0.2.3/src/libcmis/atom-document.hxx	2012-07-03 16:47:28.094183463 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/atom-document.hxx	2012-07-03 16:48:24.178187938 +0200
-@@ -35,6 +35,7 @@
- 
- #include "document.hxx"
- #include "exception.hxx"
-+#include "folder.hxx"
- #include "atom-object.hxx"
- 
- class AtomDocument : public libcmis::Document, public AtomObject
-diff -ur libcmis-0.2.3/src/libcmis/atom-object.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-object.cxx
---- libcmis-0.2.3/src/libcmis/atom-object.cxx	2012-07-03 16:47:28.095183463 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/atom-object.cxx	2012-07-03 16:48:24.179187937 +0200
-@@ -435,12 +435,14 @@
-         // Get the infos URL as we may not have it
-         m_infosUrl = getLink( "self", "application/atom+xml;type=entry" )->getHref( );
- 
--        // Get the URL to the allowableActions
--        AtomLink* allowableActionsLink = getLink( "http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions", "application/cmisallowableactions+xml" );
--        if ( NULL != allowableActionsLink )
-+        // Get the allowableActions
-+        xpathObj = xmlXPathEvalExpression( BAD_CAST( "//cmis:allowableActions" ), xpathCtx );
-+        if ( xpathObj && xpathObj->nodesetval && xpathObj->nodesetval->nodeNr > 0 )
-         {
--            m_allowableActions.reset( new AtomAllowableActions( m_session, allowableActionsLink->getHref( ) ) );
-+            xmlNodePtr node = xpathObj->nodesetval->nodeTab[0];
-+            m_allowableActions.reset( new libcmis::AllowableActions( node ) );
-         }
-+        xmlXPathFreeObject( xpathObj );
- 
-         // First get the type id as it will give us the property definitions
-         string typeIdReq( "//cmis:propertyId[@propertyDefinitionId='cmis:objectTypeId']/cmis:value/text()" );
-diff -ur libcmis-0.2.3/src/libcmis/atom-object.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-object.hxx
---- libcmis-0.2.3/src/libcmis/atom-object.hxx	2012-07-03 16:47:28.043183458 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/atom-object.hxx	2012-07-03 16:48:24.179187937 +0200
-@@ -30,7 +30,7 @@
- 
- #include <libxml/tree.h>
- 
--#include "atom-allowable-actions.hxx"
-+#include "allowable-actions.hxx"
- #include "object.hxx"
- 
- class AtomPubSession;
-@@ -64,7 +64,7 @@
-         libcmis::ObjectTypePtr m_typeDescription;
- 
-         std::map< std::string, libcmis::PropertyPtr > m_properties;
--        boost::shared_ptr< AtomAllowableActions > m_allowableActions;
-+        boost::shared_ptr< libcmis::AllowableActions > m_allowableActions;
- 
-         std::vector< AtomLink > m_links;
- 
-diff -ur libcmis-0.2.3/src/libcmis/atom-session.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-session.cxx
---- libcmis-0.2.3/src/libcmis/atom-session.cxx	2012-07-03 16:47:27.989183454 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/atom-session.cxx	2012-07-03 16:48:24.179187937 +0200
-@@ -311,6 +311,7 @@
-     string pattern = getWorkspace().getUriTemplate( atom::UriTemplate::ObjectById );
-     map< string, string > vars;
-     vars[URI_TEMPLATE_VAR_ID] = id;
-+    vars[string( "includeAllowableActions" )] = string( "true" );
-     string url = createUrl( pattern, vars );
- 
-     try
-@@ -340,6 +341,7 @@
-     string pattern = getWorkspace().getUriTemplate( atom::UriTemplate::ObjectByPath );
-     map< string, string > vars;
-     vars[URI_TEMPLATE_VAR_PATH] = path;
-+    vars[string( "includeAllowableActions" )] = string( "true" );
-     string url = createUrl( pattern, vars );
- 
-     try
-diff -ur libcmis-0.2.3/src/libcmis/Makefile.am misc/build/libcmis-0.2.3/src/libcmis/Makefile.am
---- libcmis-0.2.3/src/libcmis/Makefile.am	2012-07-03 16:47:28.021183457 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/Makefile.am	2012-07-03 16:48:24.177187939 +0200
-@@ -32,8 +32,6 @@
- 	atom-utils.cxx \
- 	atom-workspace.hxx \
- 	atom-workspace.cxx \
--	atom-allowable-actions.hxx \
--	atom-allowable-actions.cxx \
- 	allowable-actions.cxx \
- 	property.cxx \
- 	property-type.cxx \
-diff -ur libcmis-0.2.3/src/libcmis/makefile.mk misc/build/libcmis-0.2.3/src/libcmis/makefile.mk
---- libcmis-0.2.3/src/libcmis/makefile.mk	2012-07-03 16:47:28.052183459 +0200
-+++ misc/build/libcmis-0.2.3/src/libcmis/makefile.mk	2012-07-03 16:48:24.179187937 +0200
-@@ -25,7 +25,6 @@
- 
- SLOFILES= \
-     $(SLO)$/allowable-actions.obj \
--	$(SLO)$/atom-allowable-actions.obj \
- 	$(SLO)$/atom-document.obj \
- 	$(SLO)$/atom-folder.obj \
- 	$(SLO)$/atom-object-type.obj \
diff --git a/libcmis/libcmis-0.2.3-backports.patch b/libcmis/libcmis-0.2.3-backports.patch
new file mode 100644
index 0000000..f40222c
--- /dev/null
+++ b/libcmis/libcmis-0.2.3-backports.patch
@@ -0,0 +1,1492 @@
+diff -urN libcmis-0.2.3/src/cmis-client.cxx misc/build/libcmis-0.2.3/src/cmis-client.cxx
+--- libcmis-0.2.3/src/cmis-client.cxx	2012-06-01 15:50:49.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/cmis-client.cxx	2012-07-05 11:21:22.316674741 +0200
+@@ -163,16 +163,13 @@
+             if ( "list-repos" == command )
+             {
+                 map< int, string > params = getSessionParams( );
+-                list< string > ids = libcmis::SessionFactory::getRepositories( params );
++                list< libcmis::RepositoryPtr > repos = libcmis::SessionFactory::getRepositories( params );
+             
+                 cout << "Repositories: ";
+-                for ( list< string >::iterator it = ids.begin(); it != ids.end(); it++ )
++                for ( list< libcmis::RepositoryPtr >::iterator it = repos.begin(); it != repos.end(); it++ )
+                 {
+-                    if ( it != ids.begin() )
+-                        cout << ", ";
+-                    cout << *it;
++                    cout << "\t" <<  ( *it )->getName() << " (" << ( *it )->getId( ) << ")" << endl;
+                 }
+-                cout << endl;
+             }
+             else if ( "show-root" == command )
+             {
+diff -urN libcmis-0.2.3/src/libcmis/allowable-actions.cxx misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.cxx
+--- libcmis-0.2.3/src/libcmis/allowable-actions.cxx	2012-02-01 12:02:56.000000000 +0100
++++ misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.cxx	2012-07-05 11:21:22.314674740 +0200
+@@ -28,14 +28,122 @@
+ 
+ #include "allowable-actions.hxx"
+ #include "object.hxx"
++#include "xml-utils.hxx"
+ 
+ using namespace std;
+ 
+ namespace libcmis
+ {
+-    AllowableActions::AllowableActions( ) :
++    ObjectAction::ObjectAction( xmlNodePtr node ) :
++        m_type( ObjectAction::DeleteObject ),
++        m_enabled( false ),
++        m_valid( false )
++    {
++        try
++        {
++            m_type = parseType( string( ( char* ) node->name ) );
++            m_valid = true;
++        }
++        catch ( const Exception& )
++        {
++            m_valid = false;
++        }
++
++        // Invalid xsd:bool will be mean false... not sure what the spec says
++        try
++        {
++            xmlChar* content = xmlNodeGetContent( node );
++            m_enabled = parseBool( string( ( char* )content ) );
++            xmlFree( content );
++        }
++        catch ( const Exception& )
++        {
++            m_enabled = false;
++        }
++    }
++
++    ObjectAction::Type ObjectAction::parseType( string type ) throw ( Exception )
++    {
++        Type value = DeleteObject;
++        if ( type == "canDeleteObject" )
++            value = DeleteObject;
++        else if ( type == "canUpdateProperties" )
++            value = UpdateProperties;
++        else if ( type == "canGetFolderTree" )
++            value = GetFolderTree;
++        else if ( type == "canGetProperties" )
++            value = GetProperties;
++        else if ( type == "canGetObjectRelationships" )
++            value = GetObjectRelationships;
++        else if ( type == "canGetObjectParents" )
++            value = GetObjectParents;
++        else if ( type == "canGetFolderParent" )
++            value = GetFolderParent;
++        else if ( type == "canGetDescendants" )
++            value = GetDescendants;
++        else if ( type == "canMoveObject" )
++            value = MoveObject;
++        else if ( type == "canDeleteContentStream" )
++            value = DeleteContentStream;
++        else if ( type == "canCheckOut" )
++            value = CheckOut;
++        else if ( type == "canCancelCheckOut" )
++            value = CancelCheckOut;
++        else if ( type == "canCheckIn" )
++            value = CheckIn;
++        else if ( type == "canSetContentStream" )
++            value = SetContentStream;
++        else if ( type == "canGetAllVersions" )
++            value = GetAllVersions;
++        else if ( type == "canAddObjectToFolder" )
++            value = AddObjectToFolder;
++        else if ( type == "canRemoveObjectFromFolder" )
++            value = RemoveObjectFromFolder;
++        else if ( type == "canGetContentStream" )
++            value = GetContentStream;
++        else if ( type == "canApplyPolicy" )
++            value = ApplyPolicy;
++        else if ( type == "canGetAppliedPolicies" )
++            value = GetAppliedPolicies;
++        else if ( type == "canRemovePolicy" )
++            value = RemovePolicy;
++        else if ( type == "canGetChildren" )
++            value = GetChildren;
++        else if ( type == "canCreateDocument" )
++            value = CreateDocument;
++        else if ( type == "canCreateFolder" )
++            value = CreateFolder;
++        else if ( type == "canCreateRelationship" )
++            value = CreateRelationship;
++        else if ( type == "canDeleteTree" )
++            value = DeleteTree;
++        else if ( type == "canGetRenditions" )
++            value = GetRenditions;
++        else if ( type == "canGetACL" )
++            value = GetACL;
++        else if ( type == "canApplyACL" )
++            value = ApplyACL;
++        else
++            throw Exception( "Invalid AllowableAction type: " + type );
++        
++        return value;
++    }
++
++    AllowableActions::AllowableActions( xmlNodePtr node ) :
+         m_states( )
+     {
++        for ( xmlNodePtr child = node->children; child; child = child->next )
++        {
++            // Check for non text children... "\n" is also a node ;)
++            if ( !xmlNodeIsText( child ) )
++            {
++                ObjectAction action( child );
++                if ( action.isValid( ) )
++                    m_states.insert( pair< libcmis::ObjectAction::Type, bool >(
++                                action.getType( ),
++                                action.isEnabled() ) );
++            }
++        }
+     }
+ 
+     AllowableActions::AllowableActions( const AllowableActions& copy ) :
+diff -urN libcmis-0.2.3/src/libcmis/allowable-actions.hxx misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.hxx
+--- libcmis-0.2.3/src/libcmis/allowable-actions.hxx	2012-02-01 12:02:56.000000000 +0100
++++ misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.hxx	2012-07-05 11:21:22.314674740 +0200
+@@ -29,6 +29,11 @@
+ #define _ALLOWABLE_ACTIONS_HXX_
+ 
+ #include <map>
++#include <string>
++
++#include <libxml/tree.h>
++
++#include "exception.hxx"
+ 
+ namespace libcmis
+ {
+@@ -37,8 +42,6 @@
+     class ObjectAction
+     {
+         public:
+-            virtual ~ObjectAction( ){ }
+-
+             enum Type
+             {
+                 DeleteObject,
+@@ -71,6 +74,25 @@
+                 GetACL,
+                 ApplyACL
+             };
++
++        private:
++            Type m_type;
++            bool m_enabled;
++            bool m_valid;
++
++        public:
++            ObjectAction( xmlNodePtr node );
++            virtual ~ObjectAction( ){ }
++
++            Type getType( ) { return m_type; }
++            bool isEnabled( ) { return m_enabled; }
++            bool isValid( ) { return m_valid; }
++
++            /** Parses the permission name into one of the enum values or throws
++                an exception for invalid input strings.
++              */
++            static Type parseType( std::string type ) throw ( Exception );
++
+     };
+ 
+     /** Class providing access to the allowed actions on an object.
+@@ -81,7 +103,7 @@
+             std::map< ObjectAction::Type, bool > m_states;
+ 
+         public:
+-            AllowableActions( );
++            AllowableActions( xmlNodePtr node );
+             AllowableActions( const AllowableActions& copy );
+             virtual ~AllowableActions( );
+ 
+diff -urN libcmis-0.2.3/src/libcmis/atom-allowable-actions.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-allowable-actions.cxx
+--- libcmis-0.2.3/src/libcmis/atom-allowable-actions.cxx	2012-05-29 10:50:50.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-allowable-actions.cxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,237 +0,0 @@
+-/* libcmis
+- * Version: MPL 1.1 / GPLv2+ / LGPLv2+
+- *
+- * The contents of this file are subject to the Mozilla Public License Version
+- * 1.1 (the "License"); you may not use this file except in compliance with
+- * the License or as specified alternatively below. You may obtain a copy of
+- * the License at http://www.mozilla.org/MPL/
+- *
+- * Software distributed under the License is distributed on an "AS IS" basis,
+- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+- * for the specific language governing rights and limitations under the
+- * License.
+- *
+- * Major Contributor(s):
+- * Copyright (C) 2011 SUSE <cbosdonnat at suse.com>
+- *
+- *
+- * All Rights Reserved.
+- *
+- * For minor contributions see the git repository.
+- *
+- * Alternatively, the contents of this file may be used under the terms of
+- * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
+- * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
+- * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
+- * instead of those above.
+- */
+-
+-#include <libxml/xpathInternals.h>
+-
+-#include "atom-allowable-actions.hxx"
+-#include "atom-utils.hxx"
+-#include "xml-utils.hxx"
+-
+-using namespace std;
+-
+-namespace atom
+-{
+-    class ObjectAction : libcmis::ObjectAction
+-    {
+-        private:
+-            libcmis::ObjectAction::Type m_type;
+-            bool m_enabled;
+-            bool m_valid;
+-
+-        public:
+-            ObjectAction( xmlNodePtr node );
+-
+-            libcmis::ObjectAction::Type getType( ) { return m_type; }
+-            bool isEnabled( ) { return m_enabled; }
+-            bool isValid( ) { return m_valid; }
+-
+-            /** Parses the atom permission name into one of the enum values or throws
+-                an exception for invalid input strings.
+-              */
+-            static libcmis::ObjectAction::Type parseType( string type ) throw ( libcmis::Exception );
+-    };
+-
+-    ObjectAction::ObjectAction( xmlNodePtr node ) :
+-        m_type( libcmis::ObjectAction::DeleteObject ),
+-        m_enabled( false ),
+-        m_valid( false )
+-    {
+-        try
+-        {
+-            m_type = parseType( string( ( char* ) node->name ) );
+-            m_valid = true;
+-        }
+-        catch ( const libcmis::Exception& e )
+-        {
+-            m_valid = false;
+-        }
+-
+-        // Invalid xsd:bool will be mean false... not sure what the spec says
+-        try
+-        {
+-            xmlChar* content = xmlNodeGetContent( node );
+-            m_enabled = libcmis::parseBool( string( ( char* )content ) );
+-            xmlFree( content );
+-        }
+-        catch ( const libcmis::Exception& e )
+-        {
+-            m_enabled = false;
+-        }
+-    }
+-
+-    libcmis::ObjectAction::Type ObjectAction::parseType( string type ) throw ( libcmis::Exception )
+-    {
+-        libcmis::ObjectAction::Type value = libcmis::ObjectAction::DeleteObject;
+-        if ( type == "canDeleteObject" )
+-            value = libcmis::ObjectAction::DeleteObject;
+-        else if ( type == "canUpdateProperties" )
+-            value = libcmis::ObjectAction::UpdateProperties;
+-        else if ( type == "canGetFolderTree" )
+-            value = libcmis::ObjectAction::GetFolderTree;
+-        else if ( type == "canGetProperties" )
+-            value = libcmis::ObjectAction::GetProperties;
+-        else if ( type == "canGetObjectRelationships" )
+-            value = libcmis::ObjectAction::GetObjectRelationships;
+-        else if ( type == "canGetObjectParents" )
+-            value = libcmis::ObjectAction::GetObjectParents;
+-        else if ( type == "canGetFolderParent" )
+-            value = libcmis::ObjectAction::GetFolderParent;
+-        else if ( type == "canGetDescendants" )
+-            value = libcmis::ObjectAction::GetDescendants;
+-        else if ( type == "canMoveObject" )
+-            value = libcmis::ObjectAction::MoveObject;
+-        else if ( type == "canDeleteContentStream" )
+-            value = libcmis::ObjectAction::DeleteContentStream;
+-        else if ( type == "canCheckOut" )
+-            value = libcmis::ObjectAction::CheckOut;
+-        else if ( type == "canCancelCheckOut" )
+-            value = libcmis::ObjectAction::CancelCheckOut;
+-        else if ( type == "canCheckIn" )
+-            value = libcmis::ObjectAction::CheckIn;
+-        else if ( type == "canSetContentStream" )
+-            value = libcmis::ObjectAction::SetContentStream;
+-        else if ( type == "canGetAllVersions" )
+-            value = libcmis::ObjectAction::GetAllVersions;
+-        else if ( type == "canAddObjectToFolder" )
+-            value = libcmis::ObjectAction::AddObjectToFolder;
+-        else if ( type == "canRemoveObjectFromFolder" )
+-            value = libcmis::ObjectAction::RemoveObjectFromFolder;
+-        else if ( type == "canGetContentStream" )
+-            value = libcmis::ObjectAction::GetContentStream;
+-        else if ( type == "canApplyPolicy" )
+-            value = libcmis::ObjectAction::ApplyPolicy;
+-        else if ( type == "canGetAppliedPolicies" )
+-            value = libcmis::ObjectAction::GetAppliedPolicies;
+-        else if ( type == "canRemovePolicy" )
+-            value = libcmis::ObjectAction::RemovePolicy;
+-        else if ( type == "canGetChildren" )
+-            value = libcmis::ObjectAction::GetChildren;
+-        else if ( type == "canCreateDocument" )
+-            value = libcmis::ObjectAction::CreateDocument;
+-        else if ( type == "canCreateFolder" )
+-            value = libcmis::ObjectAction::CreateFolder;
+-        else if ( type == "canCreateRelationship" )
+-            value = libcmis::ObjectAction::CreateRelationship;
+-        else if ( type == "canDeleteTree" )
+-            value = libcmis::ObjectAction::DeleteTree;
+-        else if ( type == "canGetRenditions" )
+-            value = libcmis::ObjectAction::GetRenditions;
+-        else if ( type == "canGetACL" )
+-            value = libcmis::ObjectAction::GetACL;
+-        else if ( type == "canApplyACL" )
+-            value = libcmis::ObjectAction::ApplyACL;
+-        else
+-            throw libcmis::Exception( "Invalid AllowableAction type: " + type );
+-        
+-        return value;
+-    }
+-}
+-
+-AtomAllowableActions::AtomAllowableActions( AtomPubSession* session ) :
+-    libcmis::AllowableActions( ),
+-    m_url( ),
+-    m_session( session )
+-{
+-}
+-
+-AtomAllowableActions::AtomAllowableActions( AtomPubSession* session, string url ) :
+-    libcmis::AllowableActions( ),
+-    m_url( url ),
+-    m_session( session )
+-{
+-    refresh();
+-}
+-
+-AtomAllowableActions::AtomAllowableActions( const AtomAllowableActions& copy ) :
+-    libcmis::AllowableActions( copy ),
+-    m_url( copy.m_url ),
+-    m_session( copy.m_session )
+-{
+-}
+-
+-const AtomAllowableActions& AtomAllowableActions::operator=( const AtomAllowableActions& copy )
+-{
+-    AllowableActions::operator=( copy );
+-    m_url = copy.m_url;
+-    m_session = copy.m_session;
+-
+-    return *this;
+-}
+-
+-void AtomAllowableActions::refresh( ) throw ( libcmis::Exception )
+-{
+-    m_states.clear( );
+-    
+-    if ( !m_url.empty( ) )
+-    {
+-        string buf;
+-        try
+-        {
+-            buf  = m_session->httpGetRequest( m_url )->str( );
+-        }
+-        catch ( const atom::CurlException& e )
+-        {
+-            throw e.getCmisException( );
+-        }
+-        xmlDocPtr doc = xmlReadMemory( buf.c_str(), buf.size(), m_url.c_str(), NULL, 0 );
+-
+-        if ( NULL == doc )
+-            throw libcmis::Exception( "Failed to parse object infos" );
+-
+-        // Populate the m_states map
+-        xmlXPathContextPtr xpathCtx = xmlXPathNewContext( doc );
+-
+-        atom::registerNamespaces( xpathCtx );
+-
+-        if ( NULL != xpathCtx )
+-        {
+-            xmlXPathObjectPtr xpathObj = xmlXPathEvalExpression( BAD_CAST( "//cmis:allowableActions" ), xpathCtx );
+-            if ( xpathObj && xpathObj->nodesetval && xpathObj->nodesetval->nodeNr > 0 )
+-            {
+-                xmlNodePtr node = xpathObj->nodesetval->nodeTab[0];
+-                for ( xmlNodePtr child = node->children; child; child = child->next )
+-                {
+-                    // Check for non text children... "\n" is also a node ;)
+-                    if ( !xmlNodeIsText( child ) )
+-                    {
+-                        atom::ObjectAction action( child );
+-                        if ( action.isValid( ) )
+-                            m_states.insert( pair< libcmis::ObjectAction::Type, bool >(
+-                                        action.getType( ),
+-                                        action.isEnabled() ) );
+-                    }
+-                }
+-            }
+-            xmlXPathFreeObject( xpathObj );
+-        }
+-
+-        xmlXPathFreeContext( xpathCtx );
+-
+-        xmlFreeDoc( doc );
+-    }
+-}
+diff -urN libcmis-0.2.3/src/libcmis/atom-allowable-actions.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-allowable-actions.hxx
+--- libcmis-0.2.3/src/libcmis/atom-allowable-actions.hxx	2012-01-19 17:26:32.000000000 +0100
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-allowable-actions.hxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,56 +0,0 @@
+-/* libcmis
+- * Version: MPL 1.1 / GPLv2+ / LGPLv2+
+- *
+- * The contents of this file are subject to the Mozilla Public License Version
+- * 1.1 (the "License"); you may not use this file except in compliance with
+- * the License or as specified alternatively below. You may obtain a copy of
+- * the License at http://www.mozilla.org/MPL/
+- *
+- * Software distributed under the License is distributed on an "AS IS" basis,
+- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+- * for the specific language governing rights and limitations under the
+- * License.
+- *
+- * Major Contributor(s):
+- * Copyright (C) 2011 SUSE <cbosdonnat at suse.com>
+- *
+- *
+- * All Rights Reserved.
+- *
+- * For minor contributions see the git repository.
+- *
+- * Alternatively, the contents of this file may be used under the terms of
+- * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
+- * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
+- * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
+- * instead of those above.
+- */
+-#ifndef _ATOM_ALLOWABLE_ACTIONS_HXX_
+-#define _ATOM_ALLOWABLE_ACTIONS_HXX_
+-
+-#include <string>
+-
+-#include "atom-session.hxx"
+-#include "allowable-actions.hxx"
+-#include "exception.hxx"
+-
+-class AtomAllowableActions : public libcmis::AllowableActions
+-{
+-    private:
+-        std::string m_url;
+-        AtomPubSession* m_session;
+-
+-    public:
+-        AtomAllowableActions( AtomPubSession* session );
+-        AtomAllowableActions( AtomPubSession* session, std::string url );
+-        AtomAllowableActions( const AtomAllowableActions& copy );
+-        ~AtomAllowableActions( ) { };
+-
+-        const AtomAllowableActions& operator=( const AtomAllowableActions& copy );
+-
+-        void setUrl( std::string url ) { m_url = url; }
+-
+-        void refresh( ) throw ( libcmis::Exception );
+-};
+-
+-#endif
+diff -urN libcmis-0.2.3/src/libcmis/atom-document.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-document.hxx
+--- libcmis-0.2.3/src/libcmis/atom-document.hxx	2012-06-01 15:47:01.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-document.hxx	2012-07-05 11:21:22.314674740 +0200
+@@ -35,6 +35,7 @@
+ 
+ #include "document.hxx"
+ #include "exception.hxx"
++#include "folder.hxx"
+ #include "atom-object.hxx"
+ 
+ class AtomDocument : public libcmis::Document, public AtomObject
+diff -urN libcmis-0.2.3/src/libcmis/atom-object.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-object.cxx
+--- libcmis-0.2.3/src/libcmis/atom-object.cxx	2012-06-08 13:43:05.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-object.cxx	2012-07-05 11:21:22.315674740 +0200
+@@ -435,12 +435,14 @@
+         // Get the infos URL as we may not have it
+         m_infosUrl = getLink( "self", "application/atom+xml;type=entry" )->getHref( );
+ 
+-        // Get the URL to the allowableActions
+-        AtomLink* allowableActionsLink = getLink( "http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions", "application/cmisallowableactions+xml" );
+-        if ( NULL != allowableActionsLink )
++        // Get the allowableActions
++        xpathObj = xmlXPathEvalExpression( BAD_CAST( "//cmis:allowableActions" ), xpathCtx );
++        if ( xpathObj && xpathObj->nodesetval && xpathObj->nodesetval->nodeNr > 0 )
+         {
+-            m_allowableActions.reset( new AtomAllowableActions( m_session, allowableActionsLink->getHref( ) ) );
++            xmlNodePtr node = xpathObj->nodesetval->nodeTab[0];
++            m_allowableActions.reset( new libcmis::AllowableActions( node ) );
+         }
++        xmlXPathFreeObject( xpathObj );
+ 
+         // First get the type id as it will give us the property definitions
+         string typeIdReq( "//cmis:propertyId[@propertyDefinitionId='cmis:objectTypeId']/cmis:value/text()" );
+diff -urN libcmis-0.2.3/src/libcmis/atom-object.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-object.hxx
+--- libcmis-0.2.3/src/libcmis/atom-object.hxx	2012-06-01 15:43:27.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-object.hxx	2012-07-05 11:21:22.315674740 +0200
+@@ -30,7 +30,7 @@
+ 
+ #include <libxml/tree.h>
+ 
+-#include "atom-allowable-actions.hxx"
++#include "allowable-actions.hxx"
+ #include "object.hxx"
+ 
+ class AtomPubSession;
+@@ -64,7 +64,7 @@
+         libcmis::ObjectTypePtr m_typeDescription;
+ 
+         std::map< std::string, libcmis::PropertyPtr > m_properties;
+-        boost::shared_ptr< AtomAllowableActions > m_allowableActions;
++        boost::shared_ptr< libcmis::AllowableActions > m_allowableActions;
+ 
+         std::vector< AtomLink > m_links;
+ 
+diff -urN libcmis-0.2.3/src/libcmis/atom-object-type.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-object-type.cxx
+--- libcmis-0.2.3/src/libcmis/atom-object-type.cxx	2012-05-29 10:50:50.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-object-type.cxx	2012-07-05 11:21:22.317674741 +0200
+@@ -255,7 +255,7 @@
+     bool createdDoc = ( NULL == doc );
+     if ( createdDoc )
+     {
+-        string pattern = m_session->getWorkspace().getUriTemplate( atom::UriTemplate::TypeById );
++        string pattern = m_session->getAtomRepository()->getUriTemplate( UriTemplate::TypeById );
+         map< string, string > vars;
+         vars[URI_TEMPLATE_VAR_ID] = getId( );
+         string url = m_session->createUrl( pattern, vars );
+diff -urN libcmis-0.2.3/src/libcmis/atom-session.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-session.cxx
+--- libcmis-0.2.3/src/libcmis/atom-session.cxx	2012-06-08 13:43:05.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-session.cxx	2012-07-05 11:21:22.317674741 +0200
+@@ -126,8 +126,8 @@
+     m_username( username ),
+     m_password( password ),
+     m_authProvided( false ),
+-    m_workspace( ),
+-    m_repositoriesIds( ),
++    m_repository( ),
++    m_repositories( ),
+     m_verbose( verbose ),
+     m_authProvider( ),
+     m_curlHandle( NULL )
+@@ -143,8 +143,8 @@
+     m_username( copy.m_username ),
+     m_password( copy.m_password ),
+     m_authProvided( copy.m_authProvided ),
+-    m_workspace( copy.m_workspace ),
+-    m_repositoriesIds( copy.m_repositoriesIds ),
++    m_repository( copy.m_repository ),
++    m_repositories( copy.m_repositories ),
+     m_verbose( copy.m_verbose ),
+     m_authProvider( copy.m_authProvider ),
+     m_curlHandle( NULL )
+@@ -162,8 +162,8 @@
+     m_username = copy.m_username;
+     m_password = copy.m_password;
+     m_authProvided = copy.m_authProvided;
+-    m_workspace = copy.m_workspace;
+-    m_repositoriesIds = copy.m_repositoriesIds;
++    m_repository = copy.m_repository;
++    m_repositories = copy.m_repositories;
+     m_verbose = copy.m_verbose;
+     m_authProvider = copy.m_authProvider;
+     m_curlHandle = NULL;
+@@ -183,7 +183,7 @@
+ 
+ void AtomPubSession::initialize( ) throw ( libcmis::Exception )
+ {
+-    if ( m_repositoriesIds.empty() )
++    if ( m_repositories.empty() )
+     {
+         // Pull the content from sAtomPubUrl
+         string buf;
+@@ -221,13 +221,13 @@
+                     {
+                         try
+                         {
+-                            atom::Workspace ws( xpathObj->nodesetval->nodeTab[i] );
++                            AtomRepositoryPtr ws( new AtomRepository( xpathObj->nodesetval->nodeTab[i] ) );
+ 
+                             // SharePoint is case insensitive for the id...
+-                            if ( lcl_tolower( ws.getId( ) ) == lcl_tolower( m_sRepository ) )
+-                                m_workspace = ws;
++                            if ( lcl_tolower( ws->getId( ) ) == lcl_tolower( m_sRepository ) )
++                                m_repository = ws;
+ 
+-                            m_repositoriesIds.push_back( ws.getId() );
++                            m_repositories.push_back( ws );
+                         }
+                         catch ( const libcmis::Exception& e )
+                         {
+@@ -246,22 +246,22 @@
+ 
+ }
+ 
+-list< string > AtomPubSession::getRepositories( string url, string username, string password, bool verbose ) throw ( libcmis::Exception )
++list< libcmis::RepositoryPtr > AtomPubSession::getRepositories( string url, string username, string password, bool verbose ) throw ( libcmis::Exception )
+ {
+     AtomPubSession session( url, string(), username, password, verbose );
+     session.initialize( );
+-    return session.m_repositoriesIds;
++    return session.m_repositories;
+ }
+ 
+-atom::Workspace& AtomPubSession::getWorkspace( ) throw ( libcmis::Exception )
++AtomRepositoryPtr AtomPubSession::getAtomRepository( ) throw ( libcmis::Exception )
+ {
+     initialize( );
+-    return m_workspace;
++    return m_repository;
+ }
+ 
+-libcmis::FolderPtr AtomPubSession::getRootFolder() throw ( libcmis::Exception )
++libcmis::RepositoryPtr AtomPubSession::getRepository( ) throw ( libcmis::Exception )
+ {
+-    return getFolder( getWorkspace().getRootId() );
++    return getAtomRepository( );
+ }
+ 
+ libcmis::ObjectPtr AtomPubSession::createObjectFromEntryDoc( xmlDocPtr doc )
+@@ -306,11 +306,17 @@
+     return cmisObject;
+ }
+ 
++libcmis::FolderPtr AtomPubSession::getRootFolder( ) throw ( libcmis::Exception )
++{
++    return getFolder( getRootId( ) );
++}
++
+ libcmis::ObjectPtr AtomPubSession::getObject( string id ) throw ( libcmis::Exception )
+ {
+-    string pattern = getWorkspace().getUriTemplate( atom::UriTemplate::ObjectById );
++    string pattern = getAtomRepository()->getUriTemplate( UriTemplate::ObjectById );
+     map< string, string > vars;
+     vars[URI_TEMPLATE_VAR_ID] = id;
++    vars[string( "includeAllowableActions" )] = string( "true" );
+     string url = createUrl( pattern, vars );
+ 
+     try
+@@ -337,9 +343,10 @@
+ 
+ libcmis::ObjectPtr AtomPubSession::getObjectByPath( string path ) throw ( libcmis::Exception )
+ {
+-    string pattern = getWorkspace().getUriTemplate( atom::UriTemplate::ObjectByPath );
++    string pattern = getAtomRepository()->getUriTemplate( UriTemplate::ObjectByPath );
+     map< string, string > vars;
+     vars[URI_TEMPLATE_VAR_PATH] = path;
++    vars[string( "includeAllowableActions" )] = string( "true" );
+     string url = createUrl( pattern, vars );
+ 
+     try
+diff -urN libcmis-0.2.3/src/libcmis/atom-session.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-session.hxx
+--- libcmis-0.2.3/src/libcmis/atom-session.hxx	2012-06-08 13:43:05.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-session.hxx	2012-07-05 11:21:22.360674743 +0200
+@@ -95,9 +95,9 @@
+         std::string m_username;
+         std::string m_password;
+         bool m_authProvided;
+-        atom::Workspace m_workspace;
++        AtomRepositoryPtr m_repository;
+ 
+-        std::list< std::string > m_repositoriesIds;
++        std::list< libcmis::RepositoryPtr > m_repositories;
+ 
+         bool m_verbose;
+         libcmis::AuthProviderPtr m_authProvider;
+@@ -113,17 +113,17 @@
+ 
+         AtomPubSession& operator=( const AtomPubSession& copy );
+ 
+-        static std::list< std::string > getRepositories( std::string url,
++        static std::list< libcmis::RepositoryPtr > getRepositories( std::string url,
+                         std::string username, std::string password,
+                         bool verbose = false ) throw ( libcmis::Exception );
+ 
+-        std::string getRootId( ) throw ( libcmis::Exception ) { return getWorkspace().getRootId( ); }
++        std::string getRootId( ) throw ( libcmis::Exception ) { return getRepository()->getRootId( ); }
+ 
+         std::string getUsername( ) { return m_username; }
+ 
+         std::string getPassword( ) { return m_password; }
+ 
+-        atom::Workspace& getWorkspace( ) throw ( libcmis::Exception );
++        AtomRepositoryPtr getAtomRepository( ) throw ( libcmis::Exception );
+ 
+         // Utility methods
+ 
+@@ -142,6 +142,8 @@
+ 
+         // Override session methods
+ 
++        virtual libcmis::RepositoryPtr getRepository( ) throw ( libcmis::Exception );
++
+         virtual libcmis::FolderPtr getRootFolder() throw ( libcmis::Exception );
+ 
+         virtual libcmis::ObjectPtr getObject( std::string id ) throw ( libcmis::Exception );
+diff -urN libcmis-0.2.3/src/libcmis/atom-workspace.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-workspace.cxx
+--- libcmis-0.2.3/src/libcmis/atom-workspace.cxx	2011-12-06 14:12:19.000000000 +0100
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-workspace.cxx	2012-07-05 11:21:22.360674743 +0200
+@@ -31,204 +31,207 @@
+ 
+ using namespace std;
+ 
+-namespace atom
++AtomRepository::AtomRepository( xmlNodePtr wsNode ) throw ( libcmis::Exception ):
++    m_id( ),
++    m_rootId( ),
++    m_name( ),
++    m_collections( ),
++    m_uriTemplates( )
+ {
+-    Workspace::Workspace( xmlNodePtr wsNode ) throw ( libcmis::Exception ):
+-        m_id( ),
+-        m_rootId( ),
+-        m_collections( ),
+-        m_uriTemplates( )
++    if ( wsNode != NULL )
+     {
+-        if ( wsNode != NULL )
+-        {
+-            xmlDocPtr doc = wrapInDoc( wsNode );
+-            xmlXPathContextPtr xpathCtx = xmlXPathNewContext( doc );
+-            atom::registerNamespaces( xpathCtx );
++        xmlDocPtr doc = atom::wrapInDoc( wsNode );
++        xmlXPathContextPtr xpathCtx = xmlXPathNewContext( doc );
++        atom::registerNamespaces( xpathCtx );
+ 
+-            if ( NULL != xpathCtx )
+-            {
+-                // Get the collections
+-                xmlXPathObjectPtr xpathObj = xmlXPathEvalExpression( BAD_CAST( "//app:collection" ), xpathCtx );
+-                if ( NULL != xpathObj )
+-                    readCollections( xpathObj->nodesetval );
+-                xmlXPathFreeObject( xpathObj );
+-
+-                // Get the URI templates
+-                xpathObj = xmlXPathEvalExpression( BAD_CAST( "//cmisra:uritemplate" ), xpathCtx );
+-                if ( NULL != xpathObj )
+-                    readUriTemplates( xpathObj->nodesetval );
+-                xmlXPathFreeObject( xpathObj );
+-                
+-                // Get the root node id
+-                string rootIdXPath( "//cmisra:repositoryInfo/cmis:rootFolderId/text()" );
+-                m_rootId = atom::getXPathValue( xpathCtx, rootIdXPath );
+-                
+-                // Get the repository id
+-                string repoIdXPath( "//cmisra:repositoryInfo/cmis:repositoryId/text()" );
+-                m_id = atom::getXPathValue( xpathCtx, repoIdXPath );
++        if ( NULL != xpathCtx )
++        {
++            // Get the collections
++            xmlXPathObjectPtr xpathObj = xmlXPathEvalExpression( BAD_CAST( "//app:collection" ), xpathCtx );
++            if ( NULL != xpathObj )
++                readCollections( xpathObj->nodesetval );
++            xmlXPathFreeObject( xpathObj );
++
++            // Get the URI templates
++            xpathObj = xmlXPathEvalExpression( BAD_CAST( "//cmisra:uritemplate" ), xpathCtx );
++            if ( NULL != xpathObj )
++                readUriTemplates( xpathObj->nodesetval );
++            xmlXPathFreeObject( xpathObj );
++            
++            // Get the root node id
++            string rootIdXPath( "//cmisra:repositoryInfo/cmis:rootFolderId/text()" );
++            m_rootId = atom::getXPathValue( xpathCtx, rootIdXPath );
++            
++            // Get the repository id
++            string repoIdXPath( "//cmisra:repositoryInfo/cmis:repositoryId/text()" );
++            m_id = atom::getXPathValue( xpathCtx, repoIdXPath );
++
++            // Get the repository name
++            string repoNameXPath( "//cmisra:repositoryInfo/cmis:repositoryName/text()" );
++            m_name = atom::getXPathValue( xpathCtx, repoNameXPath );
+ 
+-                // TODO Extract other useful stuffs
+-            }
+-            xmlXPathFreeContext( xpathCtx );
+-            xmlFreeDoc( doc );
++            // TODO Extract other useful stuffs
+         }
++        xmlXPathFreeContext( xpathCtx );
++        xmlFreeDoc( doc );
+     }
++}
+ 
+-    Workspace::Workspace( const Workspace& rCopy ) :
+-        m_id ( rCopy.m_id ),
+-        m_rootId( rCopy.m_rootId ),
+-        m_collections( rCopy.m_collections ),
+-        m_uriTemplates( rCopy.m_uriTemplates )
+-    {
+-    }
+-
+-    Workspace::~Workspace( )
+-    {
+-        m_collections.clear( );
+-        m_uriTemplates.clear( );
+-    }
+-
+-    Workspace& Workspace::operator= ( const Workspace& rCopy )
+-    {
+-        m_id = rCopy.m_id;
+-        m_rootId = rCopy.m_rootId;
+-        m_collections = rCopy.m_collections;
+-        m_uriTemplates = rCopy.m_uriTemplates;
+-
+-        return *this;
+-    }
+-
+-    string Workspace::getCollectionUrl( Collection::Type type )
+-    {
+-        return m_collections[ type ];
+-    }
+-
+-    string Workspace::getUriTemplate( UriTemplate::Type type )
+-    {
+-        return m_uriTemplates[ type ];
+-    }
++AtomRepository::AtomRepository( const AtomRepository& rCopy ) :
++    m_id ( rCopy.m_id ),
++    m_rootId( rCopy.m_rootId ),
++    m_name( rCopy.m_name ),
++    m_collections( rCopy.m_collections ),
++    m_uriTemplates( rCopy.m_uriTemplates )
++{
++}
+ 
+-    void Workspace::readCollections( xmlNodeSetPtr nodeSet )
+-    {
+-        int size = 0;
+-        if ( nodeSet )
+-            size = nodeSet->nodeNr;
++AtomRepository::~AtomRepository( )
++{
++    m_collections.clear( );
++    m_uriTemplates.clear( );
++}
+ 
+-        for ( int i = 0; i < size; i++ )
+-        {
+-            xmlNodePtr node = nodeSet->nodeTab[i];
++AtomRepository& AtomRepository::operator= ( const AtomRepository& rCopy )
++{
++    m_id = rCopy.m_id;
++    m_rootId = rCopy.m_rootId;
++    m_name = rCopy.m_name;
++    m_collections = rCopy.m_collections;
++    m_uriTemplates = rCopy.m_uriTemplates;
+ 
+-            // Look for the href property
+-            xmlChar* href = xmlGetProp( node, BAD_CAST( "href" ) );
+-            if ( href )
+-            {
+-                string collectionRef( ( char* )href );
+-                xmlFree( href );
++    return *this;
++}
+ 
+-                // Look for the cmisra:collectionType child
+-                for ( xmlNodePtr child = node->children; child; child = child->next )
+-                {
+-                    // SharePoint CMIS implementation doesn't follow the spec:
+-                    // the cmisra namespace is omitted
+-                    bool isCollectionType = xmlStrEqual( child->name, BAD_CAST( "collectionType" ) );
+-                    if ( isCollectionType )
+-                    {
+-                        xmlChar* content = xmlNodeGetContent( child );
+-                        Collection::Type type = Collection::Root;
+-                        bool typeDefined = false;
+-
+-                        if ( xmlStrEqual( content, BAD_CAST( "root" ) ) )
+-                        {
+-                            type = Collection::Root;
+-                            typeDefined = true;
+-                        }
+-                        else if ( xmlStrEqual( content, BAD_CAST( "types" ) ) )
+-                        {
+-                            type = Collection::Types;
+-                            typeDefined = true;
+-                        }
+-                        else if ( xmlStrEqual( content, BAD_CAST( "query" ) ) )
+-                        {
+-                            type = Collection::Query;
+-                            typeDefined = true;
+-                        }
+-                        else if ( xmlStrEqual( content, BAD_CAST( "checkedout" ) ) )
+-                        {
+-                            type = Collection::CheckedOut;
+-                            typeDefined = true;
+-                        }
+-                        else if ( xmlStrEqual( content, BAD_CAST( "unfiled" ) ) )
+-                        {
+-                            type = Collection::Unfiled;
+-                            typeDefined = true;
+-                        }
++string AtomRepository::getCollectionUrl( Collection::Type type )
++{
++    return m_collections[ type ];
++}
+ 
+-                        if ( typeDefined )
+-                            m_collections[ type ] = collectionRef;
++string AtomRepository::getUriTemplate( UriTemplate::Type type )
++{
++    return m_uriTemplates[ type ];
++}
+ 
+-                        xmlFree( content );
+-                    }
+-                }
+-            }
+-        }
+-    }
++void AtomRepository::readCollections( xmlNodeSetPtr nodeSet )
++{
++    int size = 0;
++    if ( nodeSet )
++        size = nodeSet->nodeNr;
+ 
+-    void Workspace::readUriTemplates( xmlNodeSetPtr nodeSet )
++    for ( int i = 0; i < size; i++ )
+     {
+-        int size = 0;
+-        if ( nodeSet )
+-            size = nodeSet->nodeNr;
++        xmlNodePtr node = nodeSet->nodeTab[i];
+ 
+-        for ( int i = 0; i < size; i++ )
++        // Look for the href property
++        xmlChar* href = xmlGetProp( node, BAD_CAST( "href" ) );
++        if ( href )
+         {
+-            xmlNodePtr node = nodeSet->nodeTab[i];
+-
+-            string templateUri;
+-            UriTemplate::Type type = UriTemplate::ObjectById;
+-            bool typeDefined = false;
++            string collectionRef( ( char* )href );
++            xmlFree( href );
+ 
+-            // Look for the cmisra:template and cmisra:type children
++            // Look for the cmisra:collectionType child
+             for ( xmlNodePtr child = node->children; child; child = child->next )
+             {
+-                bool isTemplate = xmlStrEqual( child->name, BAD_CAST( "template" ) );
+-                bool isType = xmlStrEqual( child->name, BAD_CAST( "type" ) );
+-
+-                if ( isTemplate )
+-                {
+-                    xmlChar* content = xmlNodeGetContent( child );
+-                    templateUri = string( ( char * )content );
+-                    xmlFree( content );
+-                }
+-                else if ( isType )
++                // SharePoint CMIS implementation doesn't follow the spec:
++                // the cmisra namespace is omitted
++                bool isCollectionType = xmlStrEqual( child->name, BAD_CAST( "collectionType" ) );
++                if ( isCollectionType )
+                 {
+                     xmlChar* content = xmlNodeGetContent( child );
+-                    if ( xmlStrEqual( content, BAD_CAST( "objectbyid" ) ) )
++                    Collection::Type type = Collection::Root;
++                    bool typeDefined = false;
++
++                    if ( xmlStrEqual( content, BAD_CAST( "root" ) ) )
+                     {
+-                        type = UriTemplate::ObjectById;
++                        type = Collection::Root;
+                         typeDefined = true;
+                     }
+-                    else if ( xmlStrEqual( content, BAD_CAST( "objectbypath" ) ) )
++                    else if ( xmlStrEqual( content, BAD_CAST( "types" ) ) )
+                     {
+-                        type = UriTemplate::ObjectByPath;
++                        type = Collection::Types;
+                         typeDefined = true;
+                     }
+                     else if ( xmlStrEqual( content, BAD_CAST( "query" ) ) )
+                     {
+-                        type = UriTemplate::Query;
++                        type = Collection::Query;
+                         typeDefined = true;
+                     }
+-                    else if ( xmlStrEqual( content, BAD_CAST( "typebyid" ) ) )
++                    else if ( xmlStrEqual( content, BAD_CAST( "checkedout" ) ) )
+                     {
+-                        type = UriTemplate::TypeById;
++                        type = Collection::CheckedOut;
+                         typeDefined = true;
+                     }
++                    else if ( xmlStrEqual( content, BAD_CAST( "unfiled" ) ) )
++                    {
++                        type = Collection::Unfiled;
++                        typeDefined = true;
++                    }
++
++                    if ( typeDefined )
++                        m_collections[ type ] = collectionRef;
++
+                     xmlFree( content );
+                 }
+             }
+-
+-            if ( !templateUri.empty() && typeDefined )
+-                m_uriTemplates[ type ] = templateUri;
+         }
+     }
++}
++
++void AtomRepository::readUriTemplates( xmlNodeSetPtr nodeSet )
++{
++    int size = 0;
++    if ( nodeSet )
++        size = nodeSet->nodeNr;
++
++    for ( int i = 0; i < size; i++ )
++    {
++        xmlNodePtr node = nodeSet->nodeTab[i];
++
++        string templateUri;
++        UriTemplate::Type type = UriTemplate::ObjectById;
++        bool typeDefined = false;
+ 
++        // Look for the cmisra:template and cmisra:type children
++        for ( xmlNodePtr child = node->children; child; child = child->next )
++        {
++            bool isTemplate = xmlStrEqual( child->name, BAD_CAST( "template" ) );
++            bool isType = xmlStrEqual( child->name, BAD_CAST( "type" ) );
++
++            if ( isTemplate )
++            {
++                xmlChar* content = xmlNodeGetContent( child );
++                templateUri = string( ( char * )content );
++                xmlFree( content );
++            }
++            else if ( isType )
++            {
++                xmlChar* content = xmlNodeGetContent( child );
++                if ( xmlStrEqual( content, BAD_CAST( "objectbyid" ) ) )
++                {
++                    type = UriTemplate::ObjectById;
++                    typeDefined = true;
++                }
++                else if ( xmlStrEqual( content, BAD_CAST( "objectbypath" ) ) )
++                {
++                    type = UriTemplate::ObjectByPath;
++                    typeDefined = true;
++                }
++                else if ( xmlStrEqual( content, BAD_CAST( "query" ) ) )
++                {
++                    type = UriTemplate::Query;
++                    typeDefined = true;
++                }
++                else if ( xmlStrEqual( content, BAD_CAST( "typebyid" ) ) )
++                {
++                    type = UriTemplate::TypeById;
++                    typeDefined = true;
++                }
++                xmlFree( content );
++            }
++        }
++
++        if ( !templateUri.empty() && typeDefined )
++            m_uriTemplates[ type ] = templateUri;
++    }
+ }
+diff -urN libcmis-0.2.3/src/libcmis/atom-workspace.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-workspace.hxx
+--- libcmis-0.2.3/src/libcmis/atom-workspace.hxx	2012-05-29 10:50:50.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-workspace.hxx	2012-07-05 11:21:22.361674743 +0200
+@@ -31,65 +31,71 @@
+ #include <map>
+ #include <string>
+ 
++#include <boost/shared_ptr.hpp>
+ #include <curl/curl.h>
+ #include <libxml/xpath.h>
+ 
+ #include "exception.hxx"
++#include "repository.hxx"
+ 
+ #define URI_TEMPLATE_VAR_ID std::string( "id" )
+ #define URI_TEMPLATE_VAR_PATH std::string( "path" )
+ 
+-namespace atom
+-{
+-    struct Collection {
+-        enum Type
+-        {
+-            Root,
+-            Types,
+-            Query,
+-            CheckedOut,
+-            Unfiled
+-        };
+-    };
+-
+-    struct UriTemplate {
+-        enum Type
+-        {
+-            ObjectById,
+-            ObjectByPath,
+-            TypeById,
+-            Query
+-        };
++struct Collection {
++    enum Type
++    {
++        Root,
++        Types,
++        Query,
++        CheckedOut,
++        Unfiled
+     };
++};
+ 
+-    class Workspace
++struct UriTemplate {
++    enum Type
+     {
+-        private:
+-            std::string m_id;
+-            std::string m_rootId;
+-
+-            /// Collections URLs
+-            std::map< Collection::Type, std::string > m_collections;
+-
+-            /// URI templates
+-            std::map< UriTemplate::Type, std::string > m_uriTemplates;
+-
+-        public:
+-            Workspace( xmlNodePtr wsNode = NULL ) throw ( libcmis::Exception );
+-            Workspace( const Workspace& rCopy );
+-            ~Workspace( );
+-
+-            Workspace& operator= ( const Workspace& rCopy );
+-
+-            std::string getCollectionUrl( atom::Collection::Type );
+-            std::string getUriTemplate( atom::UriTemplate::Type );
+-            std::string getRootId( ) { return m_rootId; }
+-            std::string getId( ) { return m_id; }
+-
+-        private:
+-            void readCollections( xmlNodeSetPtr pNodeSet );
+-            void readUriTemplates( xmlNodeSetPtr pNodeSet );
++        ObjectById,
++        ObjectByPath,
++        TypeById,
++        Query
+     };
+-}
++};
++
++class AtomRepository : public libcmis::Repository
++{
++    private:
++        std::string m_id;
++        std::string m_rootId;
++        std::string m_name;
++
++        /// Collections URLs
++        std::map< Collection::Type, std::string > m_collections;
++
++        /// URI templates
++        std::map< UriTemplate::Type, std::string > m_uriTemplates;
++
++    public:
++        AtomRepository( xmlNodePtr wsNode = NULL ) throw ( libcmis::Exception );
++        AtomRepository( const AtomRepository& rCopy );
++        ~AtomRepository( );
++
++        AtomRepository& operator= ( const AtomRepository& rCopy );
++
++        std::string getCollectionUrl( Collection::Type );
++        std::string getUriTemplate( UriTemplate::Type );
++
++        // Repository methods
++
++        virtual std::string getRootId( ) { return m_rootId; }
++        virtual std::string getId( ) { return m_id; }
++        virtual std::string getName( ) { return m_name; }
++
++    private:
++        void readCollections( xmlNodeSetPtr pNodeSet );
++        void readUriTemplates( xmlNodeSetPtr pNodeSet );
++};
++
++typedef boost::shared_ptr< AtomRepository > AtomRepositoryPtr;
+ 
+ #endif
+diff -urN libcmis-0.2.3/src/libcmis/Makefile.am misc/build/libcmis-0.2.3/src/libcmis/Makefile.am
+--- libcmis-0.2.3/src/libcmis/Makefile.am	2012-06-08 13:51:36.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/Makefile.am	2012-07-05 11:21:22.361674743 +0200
+@@ -9,6 +9,7 @@
+ 	object.hxx \
+ 	property-type.hxx \
+ 	property.hxx \
++	repository.hxx \
+ 	session-factory.hxx \
+ 	session.hxx \
+ 	xml-utils.hxx \
+@@ -32,8 +33,6 @@
+ 	atom-utils.cxx \
+ 	atom-workspace.hxx \
+ 	atom-workspace.cxx \
+-	atom-allowable-actions.hxx \
+-	atom-allowable-actions.cxx \
+ 	allowable-actions.cxx \
+ 	property.cxx \
+ 	property-type.cxx \
+diff -urN libcmis-0.2.3/src/libcmis/Makefile.in misc/build/libcmis-0.2.3/src/libcmis/Makefile.in
+--- libcmis-0.2.3/src/libcmis/Makefile.in	2012-06-08 14:17:01.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/Makefile.in	2012-07-05 11:21:22.361674743 +0200
+@@ -80,7 +80,7 @@
+ am_libcmis_ at LIBCMIS_API_VERSION@_la_OBJECTS = atom-object-type.lo \
+ 	session-factory.lo atom-document.lo atom-folder.lo \
+ 	atom-object.lo atom-session.lo atom-utils.lo atom-workspace.lo \
+-	atom-allowable-actions.lo allowable-actions.lo property.lo \
++	allowable-actions.lo property.lo \
+ 	property-type.lo xml-utils.lo
+ libcmis_ at LIBCMIS_API_VERSION@_la_OBJECTS =  \
+ 	$(am_libcmis_ at LIBCMIS_API_VERSION@_la_OBJECTS)
+@@ -278,6 +278,7 @@
+ 	object.hxx \
+ 	property-type.hxx \
+ 	property.hxx \
++	repository.hxx \
+ 	session-factory.hxx \
+ 	session.hxx \
+ 	xml-utils.hxx \
+@@ -301,8 +302,6 @@
+ 	atom-utils.cxx \
+ 	atom-workspace.hxx \
+ 	atom-workspace.cxx \
+-	atom-allowable-actions.hxx \
+-	atom-allowable-actions.cxx \
+ 	allowable-actions.cxx \
+ 	property.cxx \
+ 	property-type.cxx \
+@@ -417,7 +416,6 @@
+ 	-rm -f *.tab.c
+ 
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/allowable-actions.Plo at am__quote@
+- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atom-allowable-actions.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atom-document.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atom-folder.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atom-object-type.Plo at am__quote@
+diff -urN libcmis-0.2.3/src/libcmis/makefile.mk misc/build/libcmis-0.2.3/src/libcmis/makefile.mk
+--- libcmis-0.2.3/src/libcmis/makefile.mk	2012-05-09 12:14:57.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/makefile.mk	2012-07-05 11:21:22.315674740 +0200
+@@ -25,7 +25,6 @@
+ 
+ SLOFILES= \
+     $(SLO)$/allowable-actions.obj \
+-	$(SLO)$/atom-allowable-actions.obj \
+ 	$(SLO)$/atom-document.obj \
+ 	$(SLO)$/atom-folder.obj \
+ 	$(SLO)$/atom-object-type.obj \
+diff -urN libcmis-0.2.3/src/libcmis/repository.hxx misc/build/libcmis-0.2.3/src/libcmis/repository.hxx
+--- libcmis-0.2.3/src/libcmis/repository.hxx	1970-01-01 01:00:00.000000000 +0100
++++ misc/build/libcmis-0.2.3/src/libcmis/repository.hxx	2012-07-05 11:21:22.361674743 +0200
+@@ -0,0 +1,54 @@
++/* libcmis
++ * Version: MPL 1.1 / GPLv2+ / LGPLv2+
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License or as specified alternatively below. You may obtain a copy of
++ * the License at http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * Major Contributor(s):
++ * Copyright (C) 2011 Cédric Bosdonnat <cbosdo at users.sourceforge.net>
++ *
++ *
++ * All Rights Reserved.
++ *
++ * For minor contributions see the git repository.
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
++ * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
++ * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
++ * instead of those above.
++ */
++#ifndef _REPOSITORY_HXX_
++#define _REPOSITORY_HXX_
++
++#include <string>
++
++#include <boost/shared_ptr.hpp>
++
++namespace libcmis
++{
++    /** Class representing a repository and its infos.
++
++        \sa 2.2.2.2 section of the CMIS specifications
++      */
++    class Repository
++    {
++        public:
++            virtual ~Repository( ) { };
++
++            virtual std::string getRootId( ) = 0;
++            virtual std::string getId( ) = 0;
++            virtual std::string getName( ) = 0;
++    };
++    
++    typedef ::boost::shared_ptr< Repository > RepositoryPtr;
++}
++
++#endif
+diff -urN libcmis-0.2.3/src/libcmis/session-factory.cxx misc/build/libcmis-0.2.3/src/libcmis/session-factory.cxx
+--- libcmis-0.2.3/src/libcmis/session-factory.cxx	2012-05-10 15:36:32.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/session-factory.cxx	2012-07-05 11:21:22.362674743 +0200
+@@ -74,9 +74,9 @@
+         return session;
+     }
+ 
+-    list< string > SessionFactory::getRepositories( map< int, string > params ) throw ( Exception )
++    list< RepositoryPtr > SessionFactory::getRepositories( map< int, string > params ) throw ( Exception )
+     {
+-        list< string > repos;
++        list< RepositoryPtr > repos;
+ 
+         map< int, string >::iterator pIt = params.find( ATOMPUB_URL );
+         if ( pIt != params.end( ) )
+diff -urN libcmis-0.2.3/src/libcmis/session-factory.hxx misc/build/libcmis-0.2.3/src/libcmis/session-factory.hxx
+--- libcmis-0.2.3/src/libcmis/session-factory.hxx	2012-05-10 15:37:03.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/session-factory.hxx	2012-07-05 11:21:22.362674743 +0200
+@@ -33,6 +33,7 @@
+ #include <string>
+ 
+ #include "exception.hxx"
++#include "repository.hxx"
+ #include "session.hxx"
+ 
+ #define ATOMPUB_URL         0
+@@ -63,7 +64,7 @@
+               */
+             static Session* createSession( std::map< int, std::string > params ) throw ( Exception );
+ 
+-            static std::list< std::string > getRepositories( std::map< int, std::string > params ) throw ( Exception );
++            static std::list< RepositoryPtr > getRepositories( std::map< int, std::string > params ) throw ( Exception );
+     };
+ }
+ 
+diff -urN libcmis-0.2.3/src/libcmis/session.hxx misc/build/libcmis-0.2.3/src/libcmis/session.hxx
+--- libcmis-0.2.3/src/libcmis/session.hxx	2012-05-31 16:49:18.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/session.hxx	2012-07-05 11:21:22.362674743 +0200
+@@ -34,6 +34,7 @@
+ #include "object-type.hxx"
+ #include "object.hxx"
+ #include "folder.hxx"
++#include "repository.hxx"
+ 
+ namespace libcmis
+ {
+@@ -56,6 +57,10 @@
+ 
+             virtual ~Session() { };
+ 
++            /** Get the current repository.
++              */
++            virtual RepositoryPtr getRepository( ) throw ( Exception ) = 0;
++
+             /** Get the Root folder of the repository
+               */
+             virtual FolderPtr getRootFolder() throw ( Exception )= 0;
+diff -urN libcmis-0.2.3/src/libcmis/test-atom.cxx misc/build/libcmis-0.2.3/src/libcmis/test-atom.cxx
+--- libcmis-0.2.3/src/libcmis/test-atom.cxx	2012-05-30 16:17:44.000000000 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/test-atom.cxx	2012-07-05 11:21:22.362674743 +0200
+@@ -34,7 +34,6 @@
+ #include "atom-document.hxx"
+ #include "atom-folder.hxx"
+ #include "atom-session.hxx"
+-#include "atom-utils.hxx"
+ 
+ // InMemory local test server data
+ #define SERVER_ATOM_URL string( "http://localhost:8080/inmemory/atom" )
+@@ -81,7 +80,7 @@
+ #define TEST_UPDATED_PROPERTY_NAME string( "cmis:name" )
+ #define TEST_UPDATED_PROPERTY_VALUE string( "New name" )
+ 
+-using namespace boost;
++using boost::shared_ptr;
+ using namespace std;
+ 
+ class AtomTest : public CppUnit::TestFixture
+@@ -153,9 +152,9 @@
+ 
+ void AtomTest::getRepositoriesTest()
+ {
+-    list< string > ids = AtomPubSession::getRepositories( SERVER_ATOM_URL, SERVER_USERNAME, SERVER_PASSWORD );
+-    CPPUNIT_ASSERT_EQUAL_MESSAGE( "One repository should be found", SERVER_REPOSITORIES_COUNT, ids.size() );
+-    CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong repository found", SERVER_REPOSITORY, ids.front() );
++    list< libcmis::RepositoryPtr > repos = AtomPubSession::getRepositories( SERVER_ATOM_URL, SERVER_USERNAME, SERVER_PASSWORD );
++    CPPUNIT_ASSERT_EQUAL_MESSAGE( "One repository should be found", SERVER_REPOSITORIES_COUNT, repos.size() );
++    CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong repository found", SERVER_REPOSITORY, repos.front()->getId() );
+ }
+ 
+ void AtomTest::sessionCreationTest( )
+@@ -164,29 +163,29 @@
+ 
+     // Check for the mandatory collection URLs
+     CPPUNIT_ASSERT_MESSAGE( "root collection URL missing",
+-            !session.getWorkspace().getCollectionUrl( atom::Collection::Root ).empty() );
++            !session.getAtomRepository()->getCollectionUrl( Collection::Root ).empty() );
+     CPPUNIT_ASSERT_MESSAGE( "types collection URL missing",
+-            !session.getWorkspace().getCollectionUrl( atom::Collection::Types ).empty() );
++            !session.getAtomRepository()->getCollectionUrl( Collection::Types ).empty() );
+     CPPUNIT_ASSERT_MESSAGE( "query collection URL missing",
+-            !session.getWorkspace().getCollectionUrl( atom::Collection::Query ).empty() );
++            !session.getAtomRepository()->getCollectionUrl( Collection::Query ).empty() );
+ 
+     // The optional collection URLs are present on InMemory, so check them
+     CPPUNIT_ASSERT_MESSAGE( "checkedout collection URL missing",
+-            !session.getWorkspace().getCollectionUrl( atom::Collection::CheckedOut ).empty() );
++            !session.getAtomRepository()->getCollectionUrl( Collection::CheckedOut ).empty() );
+     CPPUNIT_ASSERT_MESSAGE( "unfiled collection URL missing",
+-            !session.getWorkspace().getCollectionUrl( atom::Collection::Unfiled ).empty() );
++            !session.getAtomRepository()->getCollectionUrl( Collection::Unfiled ).empty() );
+ 
+     // Check for the mandatory URI template URLs
+     CPPUNIT_ASSERT_MESSAGE( "objectbyid URI template URL missing",
+-            !session.getWorkspace().getUriTemplate( atom::UriTemplate::ObjectById ).empty() );
++            !session.getAtomRepository()->getUriTemplate( UriTemplate::ObjectById ).empty() );
+     CPPUNIT_ASSERT_MESSAGE( "objectbypath URI template URL missing",
+-            !session.getWorkspace().getUriTemplate( atom::UriTemplate::ObjectByPath ).empty() );
++            !session.getAtomRepository()->getUriTemplate( UriTemplate::ObjectByPath ).empty() );
+     CPPUNIT_ASSERT_MESSAGE( "typebyid URI template URL missing",
+-            !session.getWorkspace().getUriTemplate( atom::UriTemplate::TypeById ).empty() );
++            !session.getAtomRepository()->getUriTemplate( UriTemplate::TypeById ).empty() );
+     
+     // The optional URI template URL is present on InMemory, so check it
+     CPPUNIT_ASSERT_MESSAGE( "query URI template URL missing",
+-            !session.getWorkspace().getUriTemplate( atom::UriTemplate::Query ).empty() );
++            !session.getAtomRepository()->getUriTemplate( UriTemplate::Query ).empty() );
+ 
+     // Check that the root id is defined
+     CPPUNIT_ASSERT_MESSAGE( "Root node ID is missing",
diff --git a/libcmis/makefile.mk b/libcmis/makefile.mk
index a65123b..03c0b59 100644
--- a/libcmis/makefile.mk
+++ b/libcmis/makefile.mk
@@ -47,7 +47,7 @@ TARFILE_MD5=0d2dcdfbf28d6208751b33057f5361f0
 # Pushed upstream in both master and libcmis-0.2 branches
 PATCH_FILES+=libcmis-0.2.3.patch
 # Pushed upstream to master branch, but not to libcmis-0.2
-PATCH_FILES+=libcmis-0.2.3-allowable-actions.patch
+PATCH_FILES+=libcmis-0.2.3-backports.patch
 
 .IF "$(OS)$(COM)" == "WNTMSC"
 PATCH_FILES+=boost-win.patch


More information about the Libreoffice-commits mailing list