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