1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Callback.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 // Callback.h : Declaration of the CCallback
35 #include "resource.h" // main symbols
37 /////////////////////////////////////////////////////////////////////////////
39 class ATL_NO_VTABLE CCallback
:
40 public CComObjectRootEx
<CComSingleThreadModel
>,
41 public CComCoClass
<CCallback
, &CLSID_Callback
>,
42 public IDispatchImpl
<ICallback
, &IID_ICallback
, &LIBID_XCALLBACK_IMPLLib
>
49 DECLARE_REGISTRY_RESOURCEID(IDR_CALLBACK
)
51 DECLARE_PROTECT_FINAL_CONSTRUCT()
53 BEGIN_COM_MAP(CCallback
)
54 COM_INTERFACE_ENTRY(ICallback
)
55 COM_INTERFACE_ENTRY(IDispatch
)
60 STDMETHOD(inSeqByte
)(/*[in]*/ LPSAFEARRAY val
);
61 STDMETHOD(inSeqXEventListener
)(/*[in]*/ LPSAFEARRAY listener
, LPSAFEARRAY event
);
62 STDMETHOD(outSeqByte
)(/*[out]*/ LPSAFEARRAY
* outVal
);
63 STDMETHOD(inValues
)(/*[in]*/short aChar
, /*[in]*/ long aLong
, /*[in]*/ BSTR aString
);
64 STDMETHOD(inoutLong
)(/*[in,out]*/ long* inoutVal
);
65 STDMETHOD(inoutShort
)(/*[in,out]*/ short* inoutVal
);
66 STDMETHOD(inoutByte
)(/*[in,out]*/ unsigned char* inoutVal
);
67 STDMETHOD(inoutDouble
)(/*[in,out]*/ double* inoutVal
);
68 STDMETHOD(inoutFloat
)(/*[in,out]*/ float* inoutVal
);
69 STDMETHOD(inoutString
)(/*[in,out]*/ BSTR
*inoutVal
);
70 STDMETHOD(inoutChar
)(/*[in,out]*/ short* inoutVal
);
71 STDMETHOD(inoutBool
)(/*[in,out]*/ VARIANT_BOOL
* inoutVal
);
72 STDMETHOD(inoutAny
)(/*[in,out]*/ VARIANT
* inoutVal
);
73 STDMETHOD(inoutSeqAny
)(/*[in,out]*/ LPSAFEARRAY
* pArray
);
74 STDMETHOD(inoutEnum
)(/*[in,out]*/ long * inoutVal
);
75 STDMETHOD(inoutStruct
)(/*[in,out]*/ IDispatch
** inoutVal
);
76 STDMETHOD(inoutInterface
)(/*[in,out]*/ IDispatch
** ppdisp
);
77 STDMETHOD(inoutValuesAll
)(
78 /* [out][in] */ IDispatch __RPC_FAR
*__RPC_FAR
*aXSimple
,
79 /* [out][in] */ IDispatch __RPC_FAR
*__RPC_FAR
*aStruct
,
80 /* [out][in] */ long __RPC_FAR
*aEnum
,
81 /* [out][in] */ SAFEARRAY __RPC_FAR
* __RPC_FAR
*aSeq
,
82 /* [out][in] */ VARIANT __RPC_FAR
*aAny
,
83 /* [out][in] */ VARIANT_BOOL __RPC_FAR
*aBool
,
84 /* [out][in] */ short __RPC_FAR
*aChar
,
85 /* [out][in] */ BSTR __RPC_FAR
*aString
,
86 /* [out][in] */ float __RPC_FAR
*aFloat
,
87 /* [out][in] */ double __RPC_FAR
*aDouble
,
88 /* [out][in] */ unsigned char __RPC_FAR
*aByte
,
89 /* [out][in] */ short __RPC_FAR
*aShort
,
90 /* [out][in] */ long __RPC_FAR
*aLong
);
92 STDMETHOD(outByte
)( unsigned char* outByte
);
93 STDMETHOD(outLong
)(/*[out]*/ long* outLong
);
94 STDMETHOD(outShort
)(/*[out]*/ short *outShort
);
95 STDMETHOD(outDouble
)(/*[out]*/ double* outDouble
);
96 STDMETHOD(outFloat
)(/*[out]*/ float* outFloat
);
97 STDMETHOD(outString
)(/*[out]*/ BSTR
* outString
);
98 STDMETHOD(outChar
)(short* outChar
);
99 STDMETHOD(outBool
)(VARIANT_BOOL
* outBool
);
100 STDMETHOD(outAny
)(VARIANT
* outAny
);
101 STDMETHOD(outSeqAny
)(/*[out]*/LPSAFEARRAY
* outSeq
);
102 STDMETHOD(outEnum
)(/*[out]*/ long* outEnum
);
103 STDMETHOD(outStruct
)(/*[out]*/ IDispatch
** outStruct
);
104 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
outValuesAll(
105 /* [out] */ IDispatch __RPC_FAR
*__RPC_FAR
*ppdisp
,
106 /* [out] */ IDispatch __RPC_FAR
*__RPC_FAR
*ppSimpleStruct
,
107 /* [out] */ long __RPC_FAR
*aSimpleEnum
,
108 /* [out] */ LPSAFEARRAY
* outSeq
,
109 /* [out] */ VARIANT __RPC_FAR
*varAny
,
110 /* [out] */ VARIANT_BOOL __RPC_FAR
*aBool
,
111 /* [out] */ short __RPC_FAR
*aChar
,
112 /* [out] */ BSTR __RPC_FAR
*aString
,
113 /* [out] */ float __RPC_FAR
*aFloat
,
114 /* [out] */ double __RPC_FAR
*aDouble
,
115 /* [out] */ unsigned char __RPC_FAR
*aByte
,
116 /* [out] */ short __RPC_FAR
*aShort
,
117 /* [out] */ long __RPC_FAR
*aLong
);
120 // STDMETHOD(outValuesAll)(
121 // /*[out]*/ IDispatch** ppdisp,
122 // /*[out]*/ IUnknown** ppSimpleStruct,
123 // /*[out]*/ long* aSimpleEnum,
124 // /*[out]*/ VARIANT* ArrayAny,
125 // /*[out]*/ VARIANT* varAny,
126 // /*[out]*/ VARIANT_BOOL * aBool,
127 // /*[out]*/ unsigned short* aChar,
128 // /*[out]*/ BSTR* aString, /*[out]*/ float* aFloat,
129 // /*[out]*/ double* aDouble,
130 // /*[out]*/ signed char* aByte, /*[out]*/ short* aShort, /*[out]*/long* aLong, /*[out]*/ unsigned short* aUShort, /*[out]*/ unsigned long* aULong);
131 STDMETHOD(outValuesMixed
)(/*[in]*/ long val
, /*[out]*/ long* pval
, /*[in]*/ BSTR string
);
132 STDMETHOD(outInterface
)(/*[out]*/ IDispatch
** ppdisp
);
133 STDMETHOD(returnInterface
)(/*[out, retval]*/ IDispatch
** ppdisp
);
137 #endif //__CALLBACK_H_