merge the formfield patch from ooo-build
[ooovba.git] / cppu / source / helper / purpenv / Proxy.hxx
blobec624c8ad66c9aed65478d76be30c37789c4ab0a
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: Proxy.hxx,v $
10 * $Revision: 1.3 $
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 #ifndef INCLUDED_Proxy_hxx
32 #define INCLUDED_Proxy_hxx
34 #include "osl/interlck.h"
36 #include "uno/environment.hxx"
37 #include "uno/mapping.hxx"
38 #include "uno/dispatcher.h"
40 #include "cppu/helper/purpenv/Mapping.hxx"
43 namespace cssu = com::sun::star::uno;
46 class SAL_DLLPRIVATE Proxy : public uno_Interface
48 oslInterlockedCount m_nRef;
50 cssu::Environment m_from;
51 cssu::Environment m_to;
53 cssu::Mapping m_from_to;
54 cssu::Mapping m_to_from;
56 // mapping information
57 uno_Interface * m_pUnoI; // wrapped interface
58 typelib_InterfaceTypeDescription * m_pTypeDescr;
59 rtl::OUString m_aOId;
61 cppu::helper::purpenv::ProbeFun * m_probeFun;
62 void * m_pProbeContext;
64 public:
65 explicit Proxy(cssu::Mapping const & to_from,
66 uno_Environment * pTo,
67 uno_Environment * pFrom,
68 uno_Interface * pUnoI,
69 typelib_InterfaceTypeDescription * pTypeDescr,
70 rtl::OUString const & rOId,
71 cppu::helper::purpenv::ProbeFun * probeFun,
72 void * pProbeContext)
73 SAL_THROW( () );
74 ~Proxy(void);
76 void acquire(void);
77 void release(void);
79 void dispatch(
80 typelib_TypeDescriptionReference * pReturnTypeRef,
81 typelib_MethodParameter * pParams,
82 sal_Int32 nParams,
83 typelib_TypeDescription const * pMemberType,
84 void * pReturn,
85 void * pArgs[],
86 uno_Any ** ppException );
90 extern "C" SAL_DLLPRIVATE void SAL_CALL Proxy_free(uno_ExtEnvironment * pEnv, void * pProxy) SAL_THROW_EXTERN_C();
92 #endif