Branch libreoffice-5-0-4
[LibreOffice.git] / cppu / source / helper / purpenv / Proxy.hxx
blob037c68e8dc05ee1997fb8ae24891a0a98b33305e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CPPU_SOURCE_HELPER_PURPENV_PROXY_HXX
21 #define INCLUDED_CPPU_SOURCE_HELPER_PURPENV_PROXY_HXX
23 #include "osl/interlck.h"
25 #include "uno/environment.hxx"
26 #include "uno/mapping.hxx"
27 #include "uno/dispatcher.h"
29 #include "cppu/helper/purpenv/Mapping.hxx"
32 class Proxy : public uno_Interface
34 oslInterlockedCount m_nRef;
36 css::uno::Environment m_from;
37 css::uno::Environment m_to;
39 css::uno::Mapping m_from_to;
40 css::uno::Mapping m_to_from;
42 // mapping information
43 uno_Interface * m_pUnoI; // wrapped interface
44 typelib_InterfaceTypeDescription * m_pTypeDescr;
45 rtl::OUString m_aOId;
47 cppu::helper::purpenv::ProbeFun * m_probeFun;
48 void * m_pProbeContext;
50 public:
51 explicit Proxy(css::uno::Mapping const & to_from,
52 uno_Environment * pTo,
53 uno_Environment * pFrom,
54 uno_Interface * pUnoI,
55 typelib_InterfaceTypeDescription * pTypeDescr,
56 rtl::OUString const & rOId,
57 cppu::helper::purpenv::ProbeFun * probeFun,
58 void * pProbeContext);
59 ~Proxy();
61 void acquire();
62 void release();
64 void dispatch(
65 typelib_TypeDescriptionReference * pReturnTypeRef,
66 typelib_MethodParameter * pParams,
67 sal_Int32 nParams,
68 typelib_TypeDescription const * pMemberType,
69 void * pReturn,
70 void * pArgs[],
71 uno_Any ** ppException );
75 extern "C" void SAL_CALL Proxy_free(uno_ExtEnvironment * pEnv, void * pProxy) SAL_THROW_EXTERN_C();
77 #endif
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */