1 /*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2011 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27 
28 #ifndef INCLUDED_BINARYURP_SOURCE_INCOMINGREQUEST_HXX
29 #define INCLUDED_BINARYURP_SOURCE_INCOMINGREQUEST_HXX
30 
31 #include "sal/config.h"
32 
33 #include <vector>
34 
35 #include "boost/noncopyable.hpp"
36 #include "rtl/byteseq.hxx"
37 #include "rtl/ref.hxx"
38 #include "rtl/ustring.hxx"
39 #include "sal/types.h"
40 #include "typelib/typedescription.hxx"
41 #include "uno/dispatcher.hxx"
42 
43 namespace binaryurp {
44     class BinaryAny;
45     class Bridge;
46 }
47 
48 namespace binaryurp {
49 
50 class IncomingRequest: private boost::noncopyable {
51 public:
52     IncomingRequest(
53         rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid,
54         rtl::OUString const & oid,
55         com::sun::star::uno::UnoInterfaceReference const & object,
56         com::sun::star::uno::TypeDescription const & type,
57         sal_uInt16 functionId, bool synchronous,
58         com::sun::star::uno::TypeDescription const & member, bool setter,
59         std::vector< BinaryAny > const & inArguments, bool currentContextMode,
60         com::sun::star::uno::UnoInterfaceReference const & currentContext);
61 
62     ~IncomingRequest();
63 
64     void execute() const;
65 
66 private:
67     bool execute_throw(
68         BinaryAny * returnValue, std::vector< BinaryAny > * outArguments) const;
69 
70     rtl::Reference< Bridge > bridge_;
71     rtl::ByteSequence tid_;
72     rtl::OUString oid_; // initial object queryInterface; release
73     com::sun::star::uno::UnoInterfaceReference object_;
74     com::sun::star::uno::TypeDescription type_;
75     sal_uInt16 functionId_;
76     bool synchronous_;
77     com::sun::star::uno::TypeDescription member_;
78     bool setter_;
79     std::vector< BinaryAny > inArguments_;
80     bool currentContextMode_;
81     com::sun::star::uno::UnoInterfaceReference currentContext_;
82 };
83 
84 }
85 
86 #endif
87