1*c6ed87c9SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c6ed87c9SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c6ed87c9SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c6ed87c9SAndrew Rist * distributed with this work for additional information 6*c6ed87c9SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c6ed87c9SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c6ed87c9SAndrew Rist * "License"); you may not use this file except in compliance 9*c6ed87c9SAndrew Rist * with the License. You may obtain a copy of the License at 10*c6ed87c9SAndrew Rist * 11*c6ed87c9SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c6ed87c9SAndrew Rist * 13*c6ed87c9SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c6ed87c9SAndrew Rist * software distributed under the License is distributed on an 15*c6ed87c9SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c6ed87c9SAndrew Rist * KIND, either express or implied. See the License for the 17*c6ed87c9SAndrew Rist * specific language governing permissions and limitations 18*c6ed87c9SAndrew Rist * under the License. 19*c6ed87c9SAndrew Rist * 20*c6ed87c9SAndrew Rist *************************************************************/ 21*c6ed87c9SAndrew Rist 22*c6ed87c9SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef INCLUDED_Proxy_hxx 25cdf0e10cSrcweir #define INCLUDED_Proxy_hxx 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "osl/interlck.h" 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include "uno/environment.hxx" 30cdf0e10cSrcweir #include "uno/mapping.hxx" 31cdf0e10cSrcweir #include "uno/dispatcher.h" 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include "cppu/helper/purpenv/Mapping.hxx" 34cdf0e10cSrcweir 35cdf0e10cSrcweir 36cdf0e10cSrcweir namespace cssu = com::sun::star::uno; 37cdf0e10cSrcweir 38cdf0e10cSrcweir 39cdf0e10cSrcweir class SAL_DLLPRIVATE Proxy : public uno_Interface 40cdf0e10cSrcweir { 41cdf0e10cSrcweir oslInterlockedCount m_nRef; 42cdf0e10cSrcweir 43cdf0e10cSrcweir cssu::Environment m_from; 44cdf0e10cSrcweir cssu::Environment m_to; 45cdf0e10cSrcweir 46cdf0e10cSrcweir cssu::Mapping m_from_to; 47cdf0e10cSrcweir cssu::Mapping m_to_from; 48cdf0e10cSrcweir 49cdf0e10cSrcweir // mapping information 50cdf0e10cSrcweir uno_Interface * m_pUnoI; // wrapped interface 51cdf0e10cSrcweir typelib_InterfaceTypeDescription * m_pTypeDescr; 52cdf0e10cSrcweir rtl::OUString m_aOId; 53cdf0e10cSrcweir 54cdf0e10cSrcweir cppu::helper::purpenv::ProbeFun * m_probeFun; 55cdf0e10cSrcweir void * m_pProbeContext; 56cdf0e10cSrcweir 57cdf0e10cSrcweir public: 58cdf0e10cSrcweir explicit Proxy(cssu::Mapping const & to_from, 59cdf0e10cSrcweir uno_Environment * pTo, 60cdf0e10cSrcweir uno_Environment * pFrom, 61cdf0e10cSrcweir uno_Interface * pUnoI, 62cdf0e10cSrcweir typelib_InterfaceTypeDescription * pTypeDescr, 63cdf0e10cSrcweir rtl::OUString const & rOId, 64cdf0e10cSrcweir cppu::helper::purpenv::ProbeFun * probeFun, 65cdf0e10cSrcweir void * pProbeContext) 66cdf0e10cSrcweir SAL_THROW( () ); 67cdf0e10cSrcweir ~Proxy(void); 68cdf0e10cSrcweir 69cdf0e10cSrcweir void acquire(void); 70cdf0e10cSrcweir void release(void); 71cdf0e10cSrcweir 72cdf0e10cSrcweir void dispatch( 73cdf0e10cSrcweir typelib_TypeDescriptionReference * pReturnTypeRef, 74cdf0e10cSrcweir typelib_MethodParameter * pParams, 75cdf0e10cSrcweir sal_Int32 nParams, 76cdf0e10cSrcweir typelib_TypeDescription const * pMemberType, 77cdf0e10cSrcweir void * pReturn, 78cdf0e10cSrcweir void * pArgs[], 79cdf0e10cSrcweir uno_Any ** ppException ); 80cdf0e10cSrcweir 81cdf0e10cSrcweir }; 82cdf0e10cSrcweir 83cdf0e10cSrcweir extern "C" SAL_DLLPRIVATE void SAL_CALL Proxy_free(uno_ExtEnvironment * pEnv, void * pProxy) SAL_THROW_EXTERN_C(); 84cdf0e10cSrcweir 85cdf0e10cSrcweir #endif 86