LibreOffice Module cppu (master) 1
Proxy.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <osl/interlck.h>
23
24#include <uno/environment.hxx>
25#include <uno/mapping.hxx>
26#include <uno/dispatcher.h>
27
29
30
31class Proxy : public uno_Interface
32{
33 oslInterlockedCount m_nRef;
34
35 css::uno::Environment m_from;
36 css::uno::Environment m_to;
37
38 css::uno::Mapping m_from_to;
39 css::uno::Mapping m_to_from;
40
41 // mapping information
42 uno_Interface * m_pUnoI; // wrapped interface
43 typelib_InterfaceTypeDescription * m_pTypeDescr;
44 OUString m_aOId;
45
48
49public:
50 explicit Proxy(css::uno::Mapping to_from,
51 uno_Environment * pTo,
52 uno_Environment * pFrom,
53 uno_Interface * pUnoI,
54 typelib_InterfaceTypeDescription * pTypeDescr,
55 OUString const & rOId,
57 void * pProbeContext);
58 ~Proxy();
59
60 void acquire();
61 void release();
62
63 void dispatch(
64 typelib_TypeDescriptionReference * pReturnTypeRef,
65 typelib_MethodParameter * pParams,
66 sal_Int32 nParams,
67 typelib_TypeDescription const * pMemberType,
68 void * pReturn,
69 void * pArgs[],
70 uno_Any ** ppException );
71
72};
73
74extern "C" void Proxy_free(uno_ExtEnvironment * pEnv, void * pProxy) SAL_THROW_EXTERN_C();
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void Proxy_free(uno_ExtEnvironment *pEnv, void *pProxy) SAL_THROW_EXTERN_C()
Definition: Proxy.hxx:32
typelib_InterfaceTypeDescription * m_pTypeDescr
Definition: Proxy.hxx:43
css::uno::Mapping m_to_from
Definition: Proxy.hxx:39
OUString m_aOId
Definition: Proxy.hxx:44
css::uno::Mapping m_from_to
Definition: Proxy.hxx:38
css::uno::Environment m_to
Definition: Proxy.hxx:36
cppu::helper::purpenv::ProbeFun * m_probeFun
Definition: Proxy.hxx:46
void dispatch(typelib_TypeDescriptionReference *pReturnTypeRef, typelib_MethodParameter *pParams, sal_Int32 nParams, typelib_TypeDescription const *pMemberType, void *pReturn, void *pArgs[], uno_Any **ppException)
void * m_pProbeContext
Definition: Proxy.hxx:47
css::uno::Environment m_from
Definition: Proxy.hxx:35
uno_Interface * m_pUnoI
Definition: Proxy.hxx:42
oslInterlockedCount m_nRef
Definition: Proxy.hxx:33
Proxy(css::uno::Mapping to_from, uno_Environment *pTo, uno_Environment *pFrom, uno_Interface *pUnoI, typelib_InterfaceTypeDescription *pTypeDescr, OUString const &rOId, cppu::helper::purpenv::ProbeFun *probeFun, void *pProbeContext)
struct _uno_Environment uno_Environment
struct _typelib_TypeDescription typelib_TypeDescription
struct _uno_Any uno_Any
void ProbeFun(bool pre, void *pThis, void *pContext, typelib_TypeDescriptionReference *pReturnTypeRef, typelib_MethodParameter *pParams, sal_Int32 nParams, typelib_TypeDescription const *pMemberType, void *pReturn, void *pArgs[], uno_Any **ppException)
C++ helper for implementing Purpose Environments.
Definition: Mapping.hxx:42
#define SAL_THROW_EXTERN_C()