1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 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 // Callback.h : Declaration of the CCallback
28 
29 #ifndef __CALLBACK_H_
30 #define __CALLBACK_H_
31 
32 #include "resource.h"       // main symbols
33 
34 /////////////////////////////////////////////////////////////////////////////
35 // CCallback
36 class ATL_NO_VTABLE CCallback :
37 	public CComObjectRootEx<CComSingleThreadModel>,
38 	public CComCoClass<CCallback, &CLSID_Callback>,
39 	public IDispatchImpl<ICallback, &IID_ICallback, &LIBID_XCALLBACK_IMPLLib>
40 {
41 public:
42 	CCallback()
43 	{
44 	}
45 
46 DECLARE_REGISTRY_RESOURCEID(IDR_CALLBACK)
47 
48 DECLARE_PROTECT_FINAL_CONSTRUCT()
49 
50 BEGIN_COM_MAP(CCallback)
51 	COM_INTERFACE_ENTRY(ICallback)
52 	COM_INTERFACE_ENTRY(IDispatch)
53 END_COM_MAP()
54 
55 // ICallback
56 public:
57 	STDMETHOD(inSeqByte)(/*[in]*/ LPSAFEARRAY val);
58 	STDMETHOD(inSeqXEventListener)(/*[in]*/ LPSAFEARRAY listener, LPSAFEARRAY event);
59 	STDMETHOD(outSeqByte)(/*[out]*/ LPSAFEARRAY* outVal);
60 	STDMETHOD(inValues)(/*[in]*/short aChar, /*[in]*/ long aLong, /*[in]*/ BSTR aString);
61 	STDMETHOD(inoutLong)(/*[in,out]*/ long* inoutVal);
62 	STDMETHOD(inoutShort)(/*[in,out]*/ short* inoutVal);
63 	STDMETHOD(inoutByte)(/*[in,out]*/ unsigned char* inoutVal);
64 	STDMETHOD(inoutDouble)(/*[in,out]*/ double* inoutVal);
65 	STDMETHOD(inoutFloat)(/*[in,out]*/ float* inoutVal);
66 	STDMETHOD(inoutString)(/*[in,out]*/ BSTR *inoutVal);
67 	STDMETHOD(inoutChar)(/*[in,out]*/ short* inoutVal);
68 	STDMETHOD(inoutBool)(/*[in,out]*/ VARIANT_BOOL * inoutVal);
69 	STDMETHOD(inoutAny)(/*[in,out]*/ VARIANT* inoutVal);
70 	STDMETHOD(inoutSeqAny)(/*[in,out]*/ LPSAFEARRAY* pArray);
71 	STDMETHOD(inoutEnum)(/*[in,out]*/ long * inoutVal);
72 	STDMETHOD(inoutStruct)(/*[in,out]*/ IDispatch** inoutVal);
73 	STDMETHOD(inoutInterface)(/*[in,out]*/ IDispatch** ppdisp);
74 	STDMETHOD(inoutValuesAll)(
75             /* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aXSimple,
76             /* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aStruct,
77             /* [out][in] */ long __RPC_FAR *aEnum,
78             /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *aSeq,
79             /* [out][in] */ VARIANT __RPC_FAR *aAny,
80             /* [out][in] */ VARIANT_BOOL __RPC_FAR *aBool,
81             /* [out][in] */ short __RPC_FAR *aChar,
82             /* [out][in] */ BSTR __RPC_FAR *aString,
83             /* [out][in] */ float __RPC_FAR *aFloat,
84             /* [out][in] */ double __RPC_FAR *aDouble,
85             /* [out][in] */ unsigned char __RPC_FAR *aByte,
86             /* [out][in] */ short __RPC_FAR *aShort,
87             /* [out][in] */ long __RPC_FAR *aLong);
88 
89 	STDMETHOD(outByte)( unsigned char* outByte);
90 	STDMETHOD(outLong)(/*[out]*/ long* outLong);
91 	STDMETHOD(outShort)(/*[out]*/ short *outShort);
92 	STDMETHOD(outDouble)(/*[out]*/ double* outDouble);
93 	STDMETHOD(outFloat)(/*[out]*/ float* outFloat);
94 	STDMETHOD(outString)(/*[out]*/ BSTR * outString);
95 	STDMETHOD(outChar)(short* outChar);
96 	STDMETHOD(outBool)(VARIANT_BOOL* outBool);
97 	STDMETHOD(outAny)(VARIANT* outAny);
98 	STDMETHOD(outSeqAny)(/*[out]*/LPSAFEARRAY* outSeq);
99 	STDMETHOD(outEnum)(/*[out]*/ long* outEnum);
100 	STDMETHOD(outStruct)(/*[out]*/ IDispatch** outStruct);
101 	        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE outValuesAll(
102             /* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppdisp,
103             /* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppSimpleStruct,
104             /* [out] */ long __RPC_FAR *aSimpleEnum,
105             /* [out] */ LPSAFEARRAY* outSeq,
106             /* [out] */ VARIANT __RPC_FAR *varAny,
107             /* [out] */ VARIANT_BOOL __RPC_FAR *aBool,
108             /* [out] */ short __RPC_FAR *aChar,
109             /* [out] */ BSTR __RPC_FAR *aString,
110             /* [out] */ float __RPC_FAR *aFloat,
111             /* [out] */ double __RPC_FAR *aDouble,
112             /* [out] */ unsigned char __RPC_FAR *aByte,
113             /* [out] */ short __RPC_FAR *aShort,
114             /* [out] */ long __RPC_FAR *aLong);
115 //				);
116 //
117 //	STDMETHOD(outValuesAll)(
118 //			/*[out]*/ IDispatch** ppdisp,
119 //			/*[out]*/ IUnknown** ppSimpleStruct,
120 //			/*[out]*/ long* aSimpleEnum,
121 //			/*[out]*/ VARIANT* ArrayAny,
122 //			/*[out]*/ VARIANT* varAny,
123 //			/*[out]*/ VARIANT_BOOL * aBool,
124 //			/*[out]*/ unsigned short* aChar,
125 //			/*[out]*/ BSTR* aString, /*[out]*/ float* aFloat,
126 //			/*[out]*/ double* aDouble,
127 //			/*[out]*/ signed char* aByte, /*[out]*/ short* aShort, /*[out]*/long* aLong, /*[out]*/ unsigned short* aUShort, /*[out]*/ unsigned long* aULong);
128 	STDMETHOD(outValuesMixed)(/*[in]*/ long val, /*[out]*/ long* pval, /*[in]*/ BSTR string);
129 	STDMETHOD(outInterface)(/*[out]*/ IDispatch** ppdisp);
130 	STDMETHOD(returnInterface)(/*[out, retval]*/ IDispatch** ppdisp);
131 	STDMETHOD(func1)();
132 };
133 
134 #endif //__CALLBACK_H_
135 
136