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 |
#ifndef __CSYNCSERVICE_H__
|
|
21 |
#define __CSYNCSERVICE_H__
|
|
22 |
|
|
23 |
// Define _WINSOCK2API_ so windows.h doesn't include it.
|
|
24 |
// This fixes compilations errors due to winsock.h being
|
|
25 |
// included by the ONC RPC static library.
|
|
26 |
#define _WINSOCK2API_
|
|
27 |
#include <windows.h>
|
|
28 |
#include <STATExp.h>
|
|
29 |
#include <string>
|
|
30 |
|
|
31 |
#include "CService.h"
|
|
32 |
|
|
33 |
// Define some error codes specific to this service
|
|
34 |
#define ERR_STAT -100
|
|
35 |
#define ERR_STAT_START_SYNC_TEST_CASE -101
|
|
36 |
#define ERR_STAT_RETRIEVE_SYNC_TEST_RESULT -102
|
|
37 |
#define ERR_STAT_RETRIEVE_SYNC_TEST_STATUS -103
|
|
38 |
#define ERR_STAT_SET_SHARED_DATA -104
|
|
39 |
|
|
40 |
class CSyncService : public CService
|
|
41 |
{
|
|
42 |
public:
|
|
43 |
CSyncService();
|
|
44 |
~CSyncService();
|
|
45 |
|
|
46 |
virtual bool Setup();
|
|
47 |
|
|
48 |
// Handle the parsing/running of particular commands
|
|
49 |
virtual int RunCommand( const CCall& aCall );
|
|
50 |
|
|
51 |
private:
|
|
52 |
HMODULE ihLib;
|
|
53 |
PROC_SENDRAWCOMMAND iptrSendRawCommand;
|
|
54 |
PROC_GETTEFSHAREDDATA iptrGetTEFSharedData;
|
|
55 |
PROC_CONNECT iptrConnect;
|
|
56 |
PROC_DISCONNECT iptrDisconnect;
|
|
57 |
|
|
58 |
int iConnection;
|
|
59 |
STATConnectType iConnectionType;
|
|
60 |
string iComPort;
|
|
61 |
string iIPAddress;
|
|
62 |
string iSTATDLLLocation;
|
|
63 |
|
|
64 |
int iTimeout;
|
|
65 |
int iPollInterval;
|
|
66 |
|
|
67 |
bool RetrieveCommsInfo();
|
|
68 |
int StartSyncTestCase( const CCall& aCall );
|
|
69 |
int RetrieveSyncTestCaseResult( const CCall& aCall );
|
|
70 |
int SetSharedData( const CCall& aCall );
|
|
71 |
};
|
|
72 |
|
|
73 |
#endif // __CSYNCSERVICE_H__
|