update dev300-m58
[ooovba.git] / cppu / test / cascade_mapping / TestProxy.hxx
blob4b14ec0d9cec2844d34e7fa4b3e3f28a6fa16cf5
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: TestProxy.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_TestProxy_hxx
32 #define INCLUDED_TestProxy_hxx
34 #include "osl/interlck.h"
35 #include "uno/dispatcher.h"
36 #include "uno/environment.hxx"
39 extern "C" void SAL_CALL TestProxy_free(uno_ExtEnvironment * pEnv, void * pObject) SAL_THROW_EXTERN_C();
42 class SAL_DLLPRIVATE TestProxy : public uno_Interface
44 private:
45 uno_Interface * m_theObject;
46 uno_ExtEnvironment * m_pFrom_extEnv;
47 uno_ExtEnvironment * m_pTo_extEnv;
48 oslInterlockedCount m_nCount;
49 rtl::OUString m_from_envDcp;
50 rtl::OUString m_to_envDcp;
51 rtl::OUString m_oid;
52 typelib_InterfaceTypeDescription * m_pTypeDescr;
54 public:
55 explicit TestProxy(uno_Interface * pObject,
56 rtl::OUString const & oid,
57 typelib_InterfaceTypeDescription * pTypeDescr,
58 uno_ExtEnvironment * pFrom_env,
59 uno_ExtEnvironment * pExtEnvironment);
60 ~TestProxy(void);
63 void acquire() SAL_THROW(());
64 void release() SAL_THROW(());
66 void dispatch(typelib_TypeDescription const * pMemberType,
67 void * pReturn,
68 void * pArgs[],
69 uno_Any ** ppException);
73 #endif