0
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef STATEXP30_H
|
|
22 |
#define STATEXP30_H
|
|
23 |
|
|
24 |
#ifndef STAT_EXPORT
|
|
25 |
#define STAT_EXPORT // __declspec(dllexport) // exports now defined in .DEF file
|
|
26 |
#endif
|
|
27 |
|
|
28 |
#include <Stat.h>
|
|
29 |
#include <StatCommon.h>
|
|
30 |
#include <ScriptProgressMonitor.h>
|
|
31 |
#include <MessageReporter.h>
|
|
32 |
#include <CStatReturnCodes.h>
|
|
33 |
|
|
34 |
// These functions are exported by name from the STAT DLL and should
|
|
35 |
// be linked with dynamically by any application that needs them.
|
|
36 |
|
|
37 |
const char ProcVersion[] = { "StdVersion" };
|
|
38 |
typedef const char* (WINAPI *PROC_VERSION)( void );
|
|
39 |
|
|
40 |
const char ProcGetError[] = { "StdGetError" };
|
|
41 |
typedef const char* (WINAPI *PROC_GETERROR)( int handle );
|
|
42 |
|
|
43 |
const char ProcGetErrorText[] = { "StdGetErrorText" };
|
|
44 |
typedef const char* (WINAPI *PROC_GETERRORTEXT)( int handle, int errorCode );
|
|
45 |
|
|
46 |
const char ProcGetTEFSharedData[] = { "StdGetTEFSharedData" };
|
|
47 |
typedef const char* (WINAPI *PROC_GETTEFSHAREDDATA)( int handle );
|
|
48 |
|
|
49 |
const char ProcSetConnectionLogging[] = { "StdSetConnectionLogging" };
|
|
50 |
typedef int (WINAPI *PROC_SETCONNECTIONLOGGING)( const char *logPath );
|
|
51 |
|
|
52 |
const char ProcCloseConnectionLogging[] = { "StdCloseConnectionLogging" };
|
|
53 |
typedef void (WINAPI *PROC_CLOSECONNECTIONLOGGING)( void );
|
|
54 |
|
|
55 |
const char ProcConnect[] = { "StdConnect" };
|
|
56 |
typedef int (WINAPI *PROC_CONNECT)( STATCONNECTTYPE iConnectType,
|
|
57 |
const char * pszPlatformType,
|
|
58 |
void *,
|
|
59 |
void *);
|
|
60 |
|
|
61 |
const char ProcDisconnect[] = { "StdDisconnect" };
|
|
62 |
typedef int (WINAPI *PROC_DISCONNECT)( int handle );
|
|
63 |
|
|
64 |
const char ProcSetCommandDelay[] = { "StdSetCommandDelay" };
|
|
65 |
typedef int (WINAPI *PROC_SETCOMMANDDELAY)( int handle,
|
|
66 |
unsigned int iMillisecondDelay
|
|
67 |
);
|
|
68 |
|
|
69 |
const char ProcSetCommandLogging[] = { "StdSetCommandLogging" };
|
|
70 |
typedef int (WINAPI *PROC_SETCOMMANDLOGGING)( int handle,
|
|
71 |
const char *pszLogPath,
|
|
72 |
MessageReporter *const aMessageReporter,
|
|
73 |
STATLOGLEVEL iLevel,
|
|
74 |
bool bAppend,
|
|
75 |
void*,
|
|
76 |
void*
|
|
77 |
);
|
|
78 |
|
|
79 |
const char ProcSetImageVerification[] = { "StdSetImageVerification" };
|
|
80 |
typedef int (WINAPI *PROC_SETIMAGEVERIFICATION)( int handle,
|
|
81 |
const char *pszRefDir,
|
|
82 |
bool bRemoveOldImages,
|
|
83 |
int iFactor
|
|
84 |
);
|
|
85 |
|
|
86 |
const char ProcOpenScriptFile[] = { "StdOpenScriptFile" };
|
|
87 |
typedef int (WINAPI *PROC_OPENSCRIPTFILE)( int handle,
|
|
88 |
LPCTSTR pszText,
|
|
89 |
bool bIsFile
|
|
90 |
);
|
|
91 |
|
|
92 |
const char ProcRunScript[] = { "StdRunScript" };
|
|
93 |
typedef int (WINAPI *PROC_RUNSCRIPT)( int handle,
|
|
94 |
ScriptProgressMonitor *const monitor
|
|
95 |
);
|
|
96 |
|
|
97 |
const char ProcSendRawCommand[] = { "StdSendRawCommand" };
|
|
98 |
typedef int (WINAPI *PROC_SENDRAWCOMMAND)( int handle,
|
|
99 |
const char *pszText,
|
|
100 |
ScriptProgressMonitor *const monitor
|
|
101 |
);
|
|
102 |
|
|
103 |
const char ProcSendCommandFile[] = { "StdSendCommandFile" };
|
|
104 |
typedef int (WINAPI *PROC_SENDCOMMANDFILE)( int handle,
|
|
105 |
const char *pszFile,
|
|
106 |
ScriptProgressMonitor *const monitor
|
|
107 |
);
|
|
108 |
|
|
109 |
const char ProcGetCommandCount[] = { "StdGetCommandCount" };
|
|
110 |
typedef int (WINAPI *PROC_GETCOMMANDCOUNT)( int handle,
|
|
111 |
const char *pszFile,
|
|
112 |
int *commandCount
|
|
113 |
);
|
|
114 |
|
|
115 |
const char ProcGetCurrentCommandNumber[] = { "StdGetCurrentCommandNumber" };
|
|
116 |
typedef int (WINAPI *PROC_GETCURRENTCOMMANDNUMBER)( int handle,
|
|
117 |
int *commandNumber
|
|
118 |
);
|
|
119 |
|
|
120 |
const char ProcGetReceivedData[] = { "StdGetReceivedData" };
|
|
121 |
typedef const char* (WINAPI *PROC_GETRECEIVEDDATA)( int handle );
|
|
122 |
const char ProcStopProcessing[] = { "StdStopProcessing" };
|
|
123 |
typedef int (WINAPI *PROC_STOPPROCESSING)( int handle );
|
|
124 |
|
|
125 |
const char ProcGetSnapShot[] = { "StdGetSnapShot" };
|
|
126 |
typedef int (WINAPI *PROC_GETSNAPSHOT)( int handle,
|
|
127 |
TBitmapFileHeader **ppFile,
|
|
128 |
TBitmapInfoHeader **ppBitmap,
|
|
129 |
char **ppData,
|
|
130 |
unsigned long *pSize
|
|
131 |
);
|
|
132 |
|
|
133 |
const char DLLFolder[] = { "\\epoc32\\tools\\stat" };
|
|
134 |
const char DLLName[] = { "stat.dll" };
|
|
135 |
const char DLLUsbName[] = { "SymbianUsb.dll" };
|
|
136 |
|
|
137 |
// Exported funcion entrypoints
|
|
138 |
extern "C"
|
|
139 |
{
|
|
140 |
// miscellaneous
|
|
141 |
STAT_EXPORT const char * __cdecl Version();
|
|
142 |
STAT_EXPORT const char * __stdcall StdVersion();
|
|
143 |
|
|
144 |
STAT_EXPORT const char * __cdecl GetError(const int handle = 0);
|
|
145 |
STAT_EXPORT const char * __stdcall StdGetError(const int handle = 0);
|
|
146 |
|
|
147 |
STAT_EXPORT const char * __cdecl GetErrorText(const int handle, int errorCode);
|
|
148 |
STAT_EXPORT const char * __stdcall StdGetErrorText(const int handle, int errorCode);
|
|
149 |
|
|
150 |
STAT_EXPORT const char * __cdecl GetTEFSharedData(const int handle = 0);
|
|
151 |
STAT_EXPORT const char * __stdcall StdGetTEFSharedData(const int handle = 0);
|
|
152 |
|
|
153 |
STAT_EXPORT int __cdecl SetConnectionLogging(const char *pszLogPath);
|
|
154 |
STAT_EXPORT void __cdecl CloseConnectionLogging();
|
|
155 |
STAT_EXPORT int __stdcall StdSetConnectionLogging(const char *pszLogPath);
|
|
156 |
STAT_EXPORT void __stdcall StdCloseConnectionLogging();
|
|
157 |
|
|
158 |
// connection
|
|
159 |
STAT_EXPORT int __cdecl Connect(const STATCONNECTTYPE iConnectType,
|
|
160 |
const char *pszPlatformType,
|
|
161 |
void *Reserved1 = NULL,
|
|
162 |
void *Reserved2 = NULL);
|
|
163 |
STAT_EXPORT int __stdcall StdConnect(const STATCONNECTTYPE iConnectType,
|
|
164 |
const char *pszPlatformType,
|
|
165 |
void *Reserved1 = NULL,
|
|
166 |
void *Reserved2 = NULL);
|
|
167 |
|
|
168 |
STAT_EXPORT int __cdecl ConnectMT(const STATCONNECTTYPE iConnectType,
|
|
169 |
const char *pszPlatformType);
|
|
170 |
STAT_EXPORT int __stdcall StdConnectMT(const STATCONNECTTYPE iConnectType,
|
|
171 |
const char *pszPlatformType);
|
|
172 |
|
|
173 |
STAT_EXPORT int __cdecl Disconnect(const int handle);
|
|
174 |
STAT_EXPORT int __stdcall StdDisconnect(const int handle);
|
|
175 |
|
|
176 |
// remote command delay (100 - 30000ms)
|
|
177 |
STAT_EXPORT int __cdecl SetCommandDelay(const int handle, const unsigned int iMillisecondDelay);
|
|
178 |
STAT_EXPORT int __stdcall StdSetCommandDelay(const int handle, const unsigned int iMillisecondDelay);
|
|
179 |
|
|
180 |
// logging
|
|
181 |
STAT_EXPORT int __cdecl SetCommandLogging(const int handle,
|
|
182 |
const char *pszLogPath,
|
|
183 |
MessageReporter *const aMessageReporter,
|
|
184 |
const STATLOGLEVEL iLevel = EVerbose,
|
|
185 |
const bool bAppend = true,
|
|
186 |
void* Reserved1 = NULL,
|
|
187 |
void* Reserved2 = NULL);
|
|
188 |
STAT_EXPORT int __stdcall StdSetCommandLogging(const int handle,
|
|
189 |
const char *pszLogPath,
|
|
190 |
MessageReporter *const aMessageReporter,
|
|
191 |
const STATLOGLEVEL iLevel = EVerbose,
|
|
192 |
const bool bAppend = true,
|
|
193 |
void* Reserved1 = NULL,
|
|
194 |
void* Reserved2 = NULL);
|
|
195 |
|
|
196 |
// image verification
|
|
197 |
STAT_EXPORT int __cdecl SetImageVerification(const int handle,
|
|
198 |
const char *pszRefDir,
|
|
199 |
const bool bRemoveOldImages,
|
|
200 |
const int iFactor);
|
|
201 |
STAT_EXPORT int __stdcall StdSetImageVerification(const int handle,
|
|
202 |
const char *pszRefDir,
|
|
203 |
const bool bRemoveOldImages,
|
|
204 |
const int iFactor);
|
|
205 |
|
|
206 |
// target manipulation
|
|
207 |
STAT_EXPORT int __cdecl GetCommandCount(const int handle, const char *pszFile, int *commandCount);
|
|
208 |
STAT_EXPORT int __stdcall StdGetCommandCount(const int handle, const char *pszFile, int *commandCount);
|
|
209 |
|
|
210 |
STAT_EXPORT int __cdecl GetCurrentCommandNumber(const int handle, int *commandNumber);
|
|
211 |
STAT_EXPORT int __stdcall StdGetCurrentCommandNumber(const int handle, int *commandNumber);
|
|
212 |
|
|
213 |
STAT_EXPORT const char* __cdecl GetReceivedData(const int handle);
|
|
214 |
STAT_EXPORT const char* __stdcall StdGetReceivedData(const int handle);
|
|
215 |
STAT_EXPORT int __cdecl OpenScriptFile(const int handle, LPCTSTR pszText, bool bIsFile);
|
|
216 |
STAT_EXPORT int __stdcall StdOpenScriptFile(const int handle, LPCTSTR pszText, bool bIsFile);
|
|
217 |
|
|
218 |
STAT_EXPORT int __cdecl RunScript(const int handle, ScriptProgressMonitor *const monitor);
|
|
219 |
STAT_EXPORT int __stdcall StdRunScript(const int handle, ScriptProgressMonitor *const monitor);
|
|
220 |
|
|
221 |
STAT_EXPORT int __cdecl SendRawCommand(const int handle, const char *pszText, ScriptProgressMonitor *const monitor);
|
|
222 |
STAT_EXPORT int __stdcall StdSendRawCommand(const int handle, const char *pszText, ScriptProgressMonitor *const monitor);
|
|
223 |
|
|
224 |
STAT_EXPORT int __cdecl SendCommandFile(const int handle, const char *pszFile, ScriptProgressMonitor *const monitor);
|
|
225 |
STAT_EXPORT int __stdcall StdSendCommandFile(const int handle, const char *pszFile, ScriptProgressMonitor *const monitor);
|
|
226 |
|
|
227 |
STAT_EXPORT int __cdecl StopProcessing(int handle);
|
|
228 |
STAT_EXPORT int __stdcall StdStopProcessing(int handle);
|
|
229 |
|
|
230 |
STAT_EXPORT int __cdecl GetSnapshot(const int handle, TBitmapFileHeader **ppFile, TBitmapInfoHeader **ppBitmap, char **ppData, unsigned long *pSize);
|
|
231 |
STAT_EXPORT int __stdcall StdGetSnapshot(const int handle, TBitmapFileHeader **ppFile, TBitmapInfoHeader **ppBitmap, char **ppData, unsigned long *pSize);
|
|
232 |
}
|
|
233 |
|
|
234 |
#endif // STATEXP30_H
|