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: include file for worker class *
|
|
15 |
*/
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#include <stat.h>
|
|
21 |
#include <stattask.h>
|
|
22 |
#include <ini.h>
|
|
23 |
#include "STATTask.h"
|
|
24 |
|
|
25 |
#define MAX_CONNECTIONS 25
|
|
26 |
#define X_MAXENTRYLEN MAX_PATH + 1
|
|
27 |
/////////////////////////////////////////////////////////////////////////
|
|
28 |
// Task initialisation info
|
|
29 |
typedef struct STATTaskInfo
|
|
30 |
{
|
|
31 |
int iterations;
|
|
32 |
int delay;
|
|
33 |
long verify;
|
|
34 |
long removeImages;
|
|
35 |
int fudge;
|
|
36 |
TCHAR *pLogfile;
|
|
37 |
TCHAR *pCommand;
|
|
38 |
TCHAR *pSnapshot;
|
|
39 |
TCHAR *pRefdir;
|
|
40 |
STATCONNECTTYPE connectType;
|
|
41 |
char szAddress[256];
|
|
42 |
} STATTASKINFO;
|
|
43 |
|
|
44 |
|
|
45 |
/////////////////////////////////////////////////////////////////////////
|
|
46 |
// Main worker class
|
|
47 |
class dlltest_worker
|
|
48 |
{
|
|
49 |
public:
|
|
50 |
dlltest_worker();
|
|
51 |
~dlltest_worker();
|
|
52 |
bool Prepare();
|
|
53 |
int WorkPending();
|
|
54 |
bool Run();
|
|
55 |
void Finish();
|
|
56 |
|
|
57 |
private:
|
|
58 |
void GetTaskInfo(int index);
|
|
59 |
void ParseConnection(char *pConnection, STATCONNECTTYPE *pType, char **ppAddress);
|
|
60 |
|
|
61 |
STATTask *pDeviceTask[MAX_CONNECTIONS]; // device connections
|
|
62 |
STATTASKINFO TaskInfo[MAX_CONNECTIONS]; // info associated with device connections
|
|
63 |
char szConections[MAX_CONNECTIONS][X_MAXENTRYLEN]; // device connection configuration
|
|
64 |
int iterations; // number of times to run test
|
|
65 |
int delay; // command delay
|
|
66 |
long lConectionCount; // number of device connections on this PC
|
|
67 |
long verify; // verify images?
|
|
68 |
long removeImages; // remove existing images before verification?
|
|
69 |
int fudge; // percentage image difference
|
|
70 |
TCHAR szLogfile[256]; // log file
|
|
71 |
TCHAR szCommand[2048]; // command to execute
|
|
72 |
TCHAR szSnapshot[256]; // file name of saved snapshot
|
|
73 |
TCHAR szRefdir[256]; // location of reference images
|
|
74 |
};
|