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) 2014 Mihai Varga <mihai.mv13@gmail.com> 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 29 #ifndef _ONEDRIVE_FOLDER_HXX_ 30 #define _ONEDRIVE_FOLDER_HXX_ 31 32 #include <libcmis/document.hxx> 33 #include <libcmis/folder.hxx> 34 35 #include "onedrive-object.hxx" 36 #include "json-utils.hxx" 37 38 class OneDriveFolder : public libcmis::Folder, public OneDriveObject 39 { 40 public: 41 OneDriveFolder( OneDriveSession* session ); 42 OneDriveFolder( OneDriveSession* session, Json json ); 43 ~OneDriveFolder( ); 44 getType()45 std::string getType( ) { return std::string( "cmis:folder" );} getBaseType()46 std::string getBaseType( ) { return std::string( "cmis:folder" );} 47 virtual std::vector< libcmis::ObjectPtr > getChildren( ); 48 49 virtual libcmis::FolderPtr createFolder( 50 const libcmis::PropertyPtrMap& properties ); 51 52 virtual libcmis::DocumentPtr createDocument( 53 const libcmis::PropertyPtrMap& properties, 54 boost::shared_ptr< std::ostream > os, 55 std::string contentType, 56 std::string fileName ); 57 58 virtual std::vector< std::string > removeTree( 59 bool allVersion = true, 60 libcmis::UnfileObjects::Type unfile = libcmis::UnfileObjects::Delete, 61 bool continueOnError = false ); 62 }; 63 64 #endif 65