-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddInNative.h
74 lines (67 loc) · 2.65 KB
/
AddInNative.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef __ADDINNATIVE_H__
#define __ADDINNATIVE_H__
#include "ComponentBase.h"
#include "AddInDefBase.h"
#include "IMemoryManager.h"
///////////////////////////////////////////////////////////////////////////////
// class CAddInNative
class CAddInNative : public IComponentBase
{
public:
enum Props
{
ePropIsEnabled = 0,
ePropIsTimerPresent,
ePropLast // Always last
};
enum Methods
{
eMethEnable = 0,
eMethDisable,
eMethShowInStatusLine,
eMethStartTimer,
eMethStopTimer,
eMethLoadPicture,
eMethLast // Always last
};
CAddInNative(void);
virtual ~CAddInNative();
// IInitDoneBase
virtual bool ADDIN_API Init(void*);
virtual bool ADDIN_API setMemManager(void* mem);
virtual long ADDIN_API GetInfo();
virtual void ADDIN_API Done();
// ILanguageExtenderBase
virtual bool ADDIN_API RegisterExtensionAs(WCHAR_T**);
virtual long ADDIN_API GetNProps();
virtual long ADDIN_API FindProp(const WCHAR_T* wsPropName);
virtual const WCHAR_T* ADDIN_API GetPropName(long lPropNum, long lPropAlias);
virtual bool ADDIN_API GetPropVal(const long lPropNum, tVariant* pvarPropVal);
virtual bool ADDIN_API SetPropVal(const long lPropNum, tVariant* varPropVal);
virtual bool ADDIN_API IsPropReadable(const long lPropNum);
virtual bool ADDIN_API IsPropWritable(const long lPropNum);
virtual long ADDIN_API GetNMethods();
virtual long ADDIN_API FindMethod(const WCHAR_T* wsMethodName);
virtual const WCHAR_T* ADDIN_API GetMethodName(const long lMethodNum,
const long lMethodAlias);
virtual long ADDIN_API GetNParams(const long lMethodNum);
virtual bool ADDIN_API GetParamDefValue(const long lMethodNum, const long lParamNum,
tVariant *pvarParamDefValue);
virtual bool ADDIN_API HasRetVal(const long lMethodNum);
virtual bool ADDIN_API CallAsProc(const long lMethodNum,
tVariant* paParams, const long lSizeArray);
virtual bool ADDIN_API CallAsFunc(const long lMethodNum,
tVariant* pvarRetValue, tVariant* paParams, const long lSizeArray);
// LocaleBase
virtual void ADDIN_API SetLocale(const WCHAR_T* loc);
private:
long findName(wchar_t* names[], const wchar_t* name, const uint32_t size) const;
void addError(uint32_t wcode, const wchar_t* source,
const wchar_t* descriptor, long code);
// Attributes
IAddInDefBase *m_iConnect;
IMemoryManager *m_iMemory;
bool m_boolEnabled;
uint32_t m_uiTimer;
};
#endif //__ADDINNATIVE_H__