Line data Source code
1 : /* libcmis
2 : * Version: MPL 1.1 / GPLv2+ / LGPLv2+
3 : *
4 : * The contents of this file are subject to the Mozilla Public License Version
5 : * 1.1 (the "License"); you may not use this file except in compliance with
6 : * the License or as specified alternatively below. You may obtain a copy of
7 : * the License at http://www.mozilla.org/MPL/
8 : *
9 : * Software distributed under the License is distributed on an "AS IS" basis,
10 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 : * for the specific language governing rights and limitations under the
12 : * License.
13 : *
14 : * Major Contributor(s):
15 : * Copyright (C) 2011 Cédric Bosdonnat <cbosdo@users.sourceforge.net>
16 : *
17 : *
18 : * All Rights Reserved.
19 : *
20 : * For minor contributions see the git repository.
21 : *
22 : * Alternatively, the contents of this file may be used under the terms of
23 : * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
24 : * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
25 : * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
26 : * instead of those above.
27 : */
28 : #ifndef _REPOSITORY_HXX_
29 : #define _REPOSITORY_HXX_
30 :
31 : #include <string>
32 :
33 : #include <boost/shared_ptr.hpp>
34 : #include <libxml/tree.h>
35 :
36 : namespace libcmis
37 : {
38 : /** Class representing a repository and its infos.
39 :
40 : \sa 2.2.2.2 section of the CMIS specifications
41 : */
42 : class Repository
43 : {
44 : protected:
45 : std::string m_id;
46 : std::string m_name;
47 : std::string m_description;
48 : std::string m_vendorName;
49 : std::string m_productName;
50 : std::string m_productVersion;
51 : std::string m_rootId;
52 : std::string m_cmisVersionSupported;
53 : boost::shared_ptr< std::string > m_thinClientUri;
54 : boost::shared_ptr< std::string > m_principalAnonymous;
55 : boost::shared_ptr< std::string > m_principalAnyone;
56 :
57 : Repository( );
58 : void initializeFromNode( xmlNodePtr node );
59 :
60 : public:
61 : Repository( xmlNodePtr node );
62 0 : virtual ~Repository( ) { };
63 :
64 0 : std::string getId( ) { return m_id; }
65 0 : std::string getName( ) { return m_name; }
66 : std::string getDescription( ) { return m_description; }
67 : std::string getVendorName( ) { return m_vendorName; }
68 : std::string getProductName( ) { return m_productName; }
69 : std::string getProductVersion( ) { return m_productVersion; }
70 : std::string getRootId( ) { return m_rootId; }
71 : std::string getCmisVersionSupported( ) { return m_cmisVersionSupported; }
72 : boost::shared_ptr< std::string > getThinClientUri( ) { return m_thinClientUri; }
73 : boost::shared_ptr< std::string > getPrincipalAnonymous( ) { return m_principalAnonymous; }
74 : boost::shared_ptr< std::string > getPrincipalAnyone( ) { return m_principalAnyone; }
75 : };
76 :
77 : typedef ::boost::shared_ptr< Repository > RepositoryPtr;
78 : }
79 :
80 : #endif
|