1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // @@@ Adjust multi-include-protection-ifdef. 29 #ifndef _MYUCP_PROVIDER_HXX 30 #define _MYUCP_PROVIDER_HXX 31 32 #include "ucbhelper/providerhelper.hxx" 33 34 // @@@ Adjust namespace name. 35 namespace myucp { 36 37 //========================================================================= 38 39 // @@@ Adjust defines. 40 41 // UNO service name for the provider. This name will be used by the UCB to 42 // create instances of the provider. Prefix with reversed company domain name. 43 #define MYUCP_CONTENT_PROVIDER_SERVICE_NAME \ 44 "com.sun.star.ucb.MyContentProvider" 45 #define MYUCP_CONTENT_PROVIDER_SERVICE_NAME_LENGTH 34 46 47 // URL scheme. This is the scheme the provider will be able to create 48 // contents for. The UCB will select the provider ( i.e. in order to create 49 // contents ) according to this scheme. 50 #define MYUCP_URL_SCHEME \ 51 "vnd.sun.star.myucp" 52 #define MYUCP_URL_SCHEME_LENGTH 18 53 54 // UCB Content Type. 55 #define MYUCP_CONTENT_TYPE \ 56 "application/" MYUCP_URL_SCHEME "-content" 57 58 //========================================================================= 59 60 class ContentProvider : public ::ucbhelper::ContentProviderImplHelper 61 { 62 public: 63 ContentProvider( const ::com::sun::star::uno::Reference< 64 ::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); 65 virtual ~ContentProvider(); 66 67 // XInterface 68 XINTERFACE_DECL() 69 70 // XTypeProvider 71 XTYPEPROVIDER_DECL() 72 73 // XServiceInfo 74 XSERVICEINFO_DECL() 75 76 // XContentProvider 77 virtual ::com::sun::star::uno::Reference< 78 ::com::sun::star::ucb::XContent > SAL_CALL 79 queryContent( const ::com::sun::star::uno::Reference< 80 ::com::sun::star::ucb::XContentIdentifier >& Identifier ) 81 throw( ::com::sun::star::ucb::IllegalIdentifierException, 82 ::com::sun::star::uno::RuntimeException ); 83 84 ////////////////////////////////////////////////////////////////////// 85 // Additional interfaces 86 ////////////////////////////////////////////////////////////////////// 87 88 ////////////////////////////////////////////////////////////////////// 89 // Non-interface methods. 90 ////////////////////////////////////////////////////////////////////// 91 }; 92 93 } 94 95 #endif 96