bump product version to 6.3.0.0.beta1
[LibreOffice.git] / extensions / test / ole / AxTestComponents / Basic.h
blobeec04aa0854d447280d71582a838c40b56131a88
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 .
19 // Basic.h : Declaration of the CBasic
21 #ifndef __BASIC_H_
22 #define __BASIC_H_
24 #include "resource.h"
25 #import "AxTestComponents.tlb" no_namespace no_implementation raw_interfaces_only named_guids
28 // CBasic
29 class ATL_NO_VTABLE CBasic :
30 public CComObjectRootEx<CComSingleThreadModel>,
31 public CComCoClass<CBasic, &CLSID_Basic>,
32 public IDispatchImpl<IBasic, &IID_IBasic, &LIBID_AXTESTCOMPONENTSLib>
34 public:
35 CBasic();
36 ~CBasic();
38 DECLARE_REGISTRY_RESOURCEID(IDR_BASIC)
40 DECLARE_PROTECT_FINAL_CONSTRUCT()
42 BEGIN_COM_MAP(CBasic)
43 COM_INTERFACE_ENTRY(IBasic)
44 COM_INTERFACE_ENTRY(IDispatch)
45 END_COM_MAP()
47 // IBasic
48 public:
49 STDMETHOD(outMore)(/*[out]*/long* val1, /*[out]*/long* val2);
50 STDMETHOD(inMulDimArrayByte2)(LPSAFEARRAY val);
51 STDMETHOD(inMulDimArrayByte)(LPSAFEARRAY val);
52 STDMETHOD(inMulDimArrayVariant2)(LPSAFEARRAY val);
53 STDMETHOD(inMulDimArrayLong2)(LPSAFEARRAY val);
54 STDMETHOD(inMulDimArrayVariant)(LPSAFEARRAY val);
55 STDMETHOD(inMulDimArrayLong)( LPSAFEARRAY val);
56 STDMETHOD(inoutSequenceObject)(LPSAFEARRAY* val);
57 STDMETHOD(inoutSequenceDouble)(LPSAFEARRAY * val);
58 STDMETHOD(inoutSequenceFloat)(LPSAFEARRAY * val);
59 STDMETHOD(inoutSequenceString)(LPSAFEARRAY* val);
60 STDMETHOD(inoutSequenceLong)(LPSAFEARRAY * val);
61 STDMETHOD(inoutSequenceShort)(LPSAFEARRAY * val);
62 STDMETHOD(inoutSequenceByte)(LPSAFEARRAY * val);
63 STDMETHOD(outSequenceObject)(/*[out]*/ LPSAFEARRAY* val);
64 STDMETHOD(outSequenceDouble)(/*[out]*/ LPSAFEARRAY* val);
65 STDMETHOD(outSequenceFloat)(/*[out]*/ LPSAFEARRAY* val);
66 STDMETHOD(outSequenceString)(/*[out]*/ LPSAFEARRAY* val);
67 STDMETHOD(outSequenceLong)(/*[out]*/ LPSAFEARRAY* val);
68 STDMETHOD(outSequenceShort)(/*[out]*/ LPSAFEARRAY* val);
69 STDMETHOD(outSequenceByte)(/*[out]*/ LPSAFEARRAY* val);
70 STDMETHOD(inSequenceObject)(LPSAFEARRAY ar);
71 STDMETHOD(inSequenceDouble)(LPSAFEARRAY ar);
72 STDMETHOD(inSequenceFloat)(LPSAFEARRAY ar);
73 STDMETHOD(inSequenceString)(LPSAFEARRAY ar);
74 STDMETHOD(inSequenceShort)(LPSAFEARRAY ar);
75 STDMETHOD(inSequenceByte)(LPSAFEARRAY ar);
76 STDMETHOD(inSequenceLong)(LPSAFEARRAY ar);
77 STDMETHOD(mixed1)(
78 /* [out][in] */ unsigned char *aChar,
79 /* [out][in] */ float *aFloat,
80 /* [out][in] */ VARIANT *aVar);
81 STDMETHOD(get_prpObject)(/*[out, retval]*/ IDispatch* *pVal);
82 STDMETHOD(put_prpObject)(/*[in]*/ IDispatch* newVal);
83 STDMETHOD(get_prpArray)(/*[out, retval]*/ LPSAFEARRAY *pVal);
84 STDMETHOD(put_prpArray)(/*[in]*/ LPSAFEARRAY newVal);
85 STDMETHOD(get_prpVariant)(/*[out, retval]*/ VARIANT *pVal);
86 STDMETHOD(put_prpVariant)(/*[in]*/ VARIANT newVal);
87 STDMETHOD(get_prpDouble)(/*[out, retval]*/ double *pVal);
88 STDMETHOD(put_prpDouble)(/*[in]*/ double newVal);
89 STDMETHOD(get_prpFloat)(/*[out, retval]*/ float *pVal);
90 STDMETHOD(put_prpFloat)(/*[in]*/ float newVal);
91 STDMETHOD(get_prpString)(/*[out, retval]*/ BSTR *pVal);
92 STDMETHOD(put_prpString)(/*[in]*/ BSTR newVal);
93 STDMETHOD(get_prpLong)(/*[out, retval]*/ long *pVal);
94 STDMETHOD(put_prpLong)(/*[in]*/ long newVal);
95 STDMETHOD(get_prpShort)(/*[out, retval]*/ short *pVal);
96 STDMETHOD(put_prpShort)(/*[in]*/ short newVal);
97 STDMETHOD(get_prpByte)(/*[out, retval]*/ unsigned char *pVal);
98 STDMETHOD(put_prpByte)(/*[in]*/ unsigned char newVal);
99 STDMETHOD(get_prpBool)(/*[out, retval]*/ VARIANT_BOOL *pVal);
100 STDMETHOD(put_prpBool)(/*[in]*/ VARIANT_BOOL newVal);
102 STDMETHOD(outObject)(/*[out]*/ IDispatch* *val);
103 STDMETHOD(outArray)(/*[out]*/ LPSAFEARRAY * val);
104 STDMETHOD(outVariant)(/*[out]*/ VARIANT* val);
105 STDMETHOD(outDouble)(/*[out]*/ double* val);
106 STDMETHOD(outFloat)(/*[out]*/ float* val);
107 STDMETHOD(outString)(/*[out]*/ BSTR* val);
108 STDMETHOD(outLong)(/*[out]*/ long* val);
109 STDMETHOD(outShort)(/*[out]*/ short* val);
110 STDMETHOD(outByte)(/*[out]*/ unsigned char* val);
111 STDMETHOD(outBool)(/*[out]*/ VARIANT_BOOL* val);
113 STDMETHOD(inoutObject)(/*[in,out]*/ IDispatch* *val);
114 STDMETHOD(inoutArray)(/*[in,out]*/ LPSAFEARRAY * val);
115 STDMETHOD(inoutVariant)(/*[in,out]*/ VARIANT * val);
116 STDMETHOD(inoutDouble)(/*[in,out]*/ double * val);
117 STDMETHOD(inoutFloat)(/*[in,out]*/ float * val);
118 STDMETHOD(inoutString)(/*[in, out]*/ BSTR* val);
119 STDMETHOD(inoutLong)(/*[in,out]*/ long * val);
120 STDMETHOD(inoutShort)(/*[in,out]*/ short* val);
121 STDMETHOD(inoutByte)(/*[in,out]*/ unsigned char* val);
122 STDMETHOD(inoutBool)(/*[in,out]*/ VARIANT_BOOL* val);
125 STDMETHOD(inObject)(/*[in]*/ IDispatch* val);
126 STDMETHOD(inArray)(/*[in]*/ LPSAFEARRAY val);
127 STDMETHOD(inVariant)(/*[in]*/ VARIANT val);
128 STDMETHOD(inDouble)(/*[in]*/ double val);
129 STDMETHOD(inFloat)(/*[in]*/ float val);
130 STDMETHOD(inString)(/*[in]*/ BSTR val);
131 STDMETHOD(inLong)(/*[in]*/ long val);
132 STDMETHOD(inShort)(/*[in]*/ short val);
133 STDMETHOD(inByte)(/*[in]*/ unsigned char val);
134 STDMETHOD(inBool)(/*[in]*/ VARIANT_BOOL val);
137 STDMETHOD(optional1)(/*[in]*/ long val1, /*[in, optional]*/ VARIANT* val2);
138 STDMETHOD(optional2)(/*[out]*/ long* val1,/*[out, optional]*/ VARIANT* val2);
139 STDMETHOD(optional3)(/*[in, optional]*/ VARIANT* val1,/*[in, optional]*/ VARIANT* val2);
140 STDMETHOD(optional4)(/*[in, out, optional]*/ VARIANT* val1,/*[in, out, optional]*/ VARIANT* val2);
141 STDMETHOD(optional5)(/*[out, optional]*/ VARIANT* val1,/*[out, optional]*/ VARIANT* val2);
144 STDMETHOD(defaultvalue1)(/*[in, defaultvalue(10)]*/ long val1,
145 /*[in, defaultvalue(3.14)]*/ double* val2,
146 /*[in, defaultvalue(100)]*/ VARIANT* val4);
148 STDMETHOD(defaultvalue2)(/*[in, out, defaultvalue(10)]*/ long* val1,
149 /*[in, out, defaultvalue(3.14)]*/ double* val2,
150 /*[in, out, defaultvalue(100)]*/ VARIANT* val4);
152 STDMETHOD(varargfunc1)(/*[in]*/ long val1,/*[in]*/ LPSAFEARRAY val2);
154 STDMETHOD(varargfunc2)(/*[out]*/ long* val1, /*[out]*/ SAFEARRAY ** val2);
157 // members for property implementations
158 unsigned char m_cPrpByte;
159 short m_nPrpShort;
160 long m_lPrpLong;
161 float m_fPrpFloat;
162 double m_dPrpDouble;
163 CComPtr<IDispatch> m_PrpObject;
164 CComPtr<IUnknown> m_prpUnknown;
166 CComBSTR m_bstrPrpString;
167 CComVariant m_PropVariant;
168 LPSAFEARRAY m_PrpArray;
169 protected:
170 VARIANT_BOOL m_bool;
171 unsigned char m_byte;
172 short m_short;
173 long m_long;
174 long m_long2;
175 float m_float;
176 double m_double;
177 CComVariant m_var1;
178 CComVariant m_var2;
179 CComVariant m_var3;
180 CComVariant m_var4;
181 CComBSTR m_bstr;
182 CY m_cy;
183 DATE m_date;
184 DECIMAL m_decimal;
185 SCODE m_scode;
186 SAFEARRAY * m_safearray;
187 CComPtr<IDispatch> m_obj;
188 CComPtr<IUnknown> m_unknown;
190 SAFEARRAY * m_arByte;
191 SAFEARRAY * m_arShort;
192 SAFEARRAY * m_arLong;
193 SAFEARRAY * m_arString;
194 SAFEARRAY * m_arVariant;
195 SAFEARRAY * m_arFloat;
196 SAFEARRAY * m_arDouble;
197 SAFEARRAY * m_arObject;
198 SAFEARRAY * m_arByteDim2;
200 static void printArray(LPSAFEARRAY val, BSTR message, VARTYPE type);
201 static void printMulArray(LPSAFEARRAY val, VARTYPE type);
204 public:
205 STDMETHOD(inSequenceByteDim2)(LPSAFEARRAY val);
206 STDMETHOD(inCurrency)(CY val);
207 STDMETHOD(outCurrency)(CY* val);
208 STDMETHOD(inoutCurrency)(CY* val);
209 STDMETHOD(inDate)(DATE val);
210 STDMETHOD(outDate)(DATE* val);
211 STDMETHOD(inoutDate)(DATE* val);
212 STDMETHOD(get_prpCurrency)(CY* pVal);
213 STDMETHOD(put_prpCurrency)(CY newVal);
214 STDMETHOD(get_prpDate)(DATE* pVal);
215 STDMETHOD(put_prpDate)(DATE newVal);
216 STDMETHOD(inDecimal)(DECIMAL val);
217 STDMETHOD(outDecimal)(DECIMAL* val);
218 STDMETHOD(inoutDecimal)(DECIMAL* val);
219 STDMETHOD(get_prpDecimal)(DECIMAL* pVal);
220 STDMETHOD(put_prpDecimal)(DECIMAL newVal);
221 STDMETHOD(inSCode)(SCODE val);
222 STDMETHOD(outScode)(SCODE* val);
223 STDMETHOD(inoutSCode)(SCODE* val);
224 STDMETHOD(get_prpSCode)(SCODE* pVal);
225 STDMETHOD(put_prpSCode)(SCODE newVal);
226 STDMETHOD(inrefLong)(LONG* val);
227 STDMETHOD(inrefVariant)(VARIANT* val);
228 STDMETHOD(inrefDecimal)(DECIMAL* val);
229 STDMETHOD(get_prpRefLong)(long* pVal);
230 STDMETHOD(putref_prpRefLong)(long* newVal);
231 STDMETHOD(get_prprefVariant)(VARIANT* pVal);
232 STDMETHOD(putref_prprefVariant)(VARIANT* newVal);
233 STDMETHOD(get_prprefDecimal)(DECIMAL* pVal);
234 STDMETHOD(putref_prprefDecimal)(DECIMAL* newVal);
235 STDMETHOD(optional6)(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARIANT* val4);
236 STDMETHOD(optional7)(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARIANT* val4);
238 STDMETHOD(get_prpMultiArg1)(VARIANT* val1, VARIANT* val2, VARIANT* pVal);
239 //STDMETHOD(get_prpMultiArg1)(VARIANT* val1, VARIANT* pVal);
240 STDMETHOD(put_prpMultiArg1)(VARIANT* val1, VARIANT* val2, VARIANT* newVal);
241 //STDMETHOD(put_prpMultiArg1)(VARIANT* val1, VARIANT* newVal);
242 STDMETHOD(get_prpMultiArg2)(VARIANT val1, VARIANT* pVal);
243 STDMETHOD(put_prpMultiArg2)(VARIANT val1, VARIANT newVal);
244 STDMETHOD(prpMultiArg2GetValues)(VARIANT* val1, VARIANT* valProperty);
245 STDMETHOD(get_prpMultiArg3)(LONG* val1, LONG* pVal);
246 STDMETHOD(put_prpMultiArg3)(LONG* val1, LONG newVal);
248 // IFoo Methods
249 public:
250 STDMETHOD(inUnknown)(IUnknown* val);
251 STDMETHOD(outUnknown)(IUnknown** val);
252 STDMETHOD(inoutUnknown)(IUnknown** val);
253 STDMETHOD(get_prpUnknown)(IUnknown** pVal);
254 STDMETHOD(put_prpUnknown)(IUnknown* newVal);
257 #endif //__BASIC_H_
259 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */