1.1 --- a/epoc32/include/networkemulator/cuccsdeviceprotocol.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/networkemulator/cuccsdeviceprotocol.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,99 +1,99 @@
1.4 -/*
1.5 -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 -* All rights reserved.
1.7 -* This component and the accompanying materials are made available
1.8 -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 -* which accompanies this distribution, and is available
1.10 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 -*
1.12 -* Initial Contributors:
1.13 -* Nokia Corporation - initial contribution.
1.14 -*
1.15 -* Contributors:
1.16 -*
1.17 -* Description:
1.18 -* CUCCSDeviceProtocol Class
1.19 -*
1.20 -*/
1.21 -
1.22 -
1.23 -#ifndef _CUCCSDeviceProtocol_H
1.24 -#define _CUCCSDeviceProtocol_H
1.25 -
1.26 -
1.27 -/*****************************************************************************
1.28 - *
1.29 - * System Includes
1.30 - *
1.31 - ****************************************************************************/
1.32 -#include <e32cons.h>
1.33 -
1.34 -
1.35 -/*****************************************************************************
1.36 - *
1.37 - * Local Includes
1.38 - *
1.39 - ****************************************************************************/
1.40 -//#include "MUCCTransport.h"
1.41 -//#include "CProtocolTypes.h"
1.42 -
1.43 -#include <mucctransport.h>
1.44 -#include <cprotocoltypes.h>
1.45 -
1.46 -
1.47 -/*****************************************************************************
1.48 - *
1.49 - * Types
1.50 - *
1.51 - ****************************************************************************/
1.52 -typedef enum {
1.53 - TDP_SUCCESS,
1.54 - TDP_INVALIDCMDID,
1.55 - TDP_SENDERROR,
1.56 - TDP_RECVERROR,
1.57 - TDP_ERRINTIALISING,
1.58 - TDP_UIDMISMATCH,
1.59 -} TDPError;
1.60 -
1.61 -typedef enum {
1.62 - TDP_IDLE,
1.63 - TDP_CONNECTED
1.64 -} TDPStatus;
1.65 -
1.66 -
1.67 -typedef enum
1.68 -{
1.69 - TDP_NONE,
1.70 - TDP_SERIAL,
1.71 - TDP_TCP
1.72 -} TDPTransport;
1.73 -
1.74 -/*****************************************************************************
1.75 - *
1.76 - * Class Definition
1.77 - *
1.78 - ****************************************************************************/
1.79 -class CUCCSDeviceProtocol : public CBase
1.80 -{
1.81 -public:
1.82 - CUCCSDeviceProtocol();
1.83 - ~CUCCSDeviceProtocol();
1.84 -
1.85 - TDPError initialise(TBufC16<40> aRemoteHost, TDPTransport aTransportType = TDP_SERIAL );
1.86 - TDPError disconnect();
1.87 -
1.88 - TDPError sendMessage(TPCommand aCmd, int aDataLength, void *aData);
1.89 - TDPError receiveMessage(TPCommand* aCmd, int* aDataLength, void* aData);
1.90 -
1.91 -private:
1.92 - bool isValidCMDID(TPCommand aCommand);
1.93 -
1.94 - int iRand_UID;
1.95 - MUCCTransport* iTransport;
1.96 - TBufC16<40> iRemoteHost;
1.97 - TInt64 iRandomSeed;
1.98 - TDPStatus iStatus;
1.99 -
1.100 -};
1.101 -
1.102 -#endif
1.103 +/*
1.104 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.105 +* All rights reserved.
1.106 +* This component and the accompanying materials are made available
1.107 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.108 +* which accompanies this distribution, and is available
1.109 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.110 +*
1.111 +* Initial Contributors:
1.112 +* Nokia Corporation - initial contribution.
1.113 +*
1.114 +* Contributors:
1.115 +*
1.116 +* Description:
1.117 +* CUCCSDeviceProtocol Class
1.118 +*
1.119 +*/
1.120 +
1.121 +
1.122 +#ifndef _CUCCSDeviceProtocol_H
1.123 +#define _CUCCSDeviceProtocol_H
1.124 +
1.125 +
1.126 +/*****************************************************************************
1.127 + *
1.128 + * System Includes
1.129 + *
1.130 + ****************************************************************************/
1.131 +#include <e32cons.h>
1.132 +
1.133 +
1.134 +/*****************************************************************************
1.135 + *
1.136 + * Local Includes
1.137 + *
1.138 + ****************************************************************************/
1.139 +//#include "MUCCTransport.h"
1.140 +//#include "CProtocolTypes.h"
1.141 +
1.142 +#include <mucctransport.h>
1.143 +#include <cprotocoltypes.h>
1.144 +
1.145 +
1.146 +/*****************************************************************************
1.147 + *
1.148 + * Types
1.149 + *
1.150 + ****************************************************************************/
1.151 +typedef enum {
1.152 + TDP_SUCCESS,
1.153 + TDP_INVALIDCMDID,
1.154 + TDP_SENDERROR,
1.155 + TDP_RECVERROR,
1.156 + TDP_ERRINTIALISING,
1.157 + TDP_UIDMISMATCH,
1.158 +} TDPError;
1.159 +
1.160 +typedef enum {
1.161 + TDP_IDLE,
1.162 + TDP_CONNECTED
1.163 +} TDPStatus;
1.164 +
1.165 +
1.166 +typedef enum
1.167 +{
1.168 + TDP_NONE,
1.169 + TDP_SERIAL,
1.170 + TDP_TCP
1.171 +} TDPTransport;
1.172 +
1.173 +/*****************************************************************************
1.174 + *
1.175 + * Class Definition
1.176 + *
1.177 + ****************************************************************************/
1.178 +class CUCCSDeviceProtocol : public CBase
1.179 +{
1.180 +public:
1.181 + CUCCSDeviceProtocol();
1.182 + ~CUCCSDeviceProtocol();
1.183 +
1.184 + TDPError initialise(TBufC16<40> aRemoteHost, TDPTransport aTransportType = TDP_SERIAL );
1.185 + TDPError disconnect();
1.186 +
1.187 + TDPError sendMessage(TPCommand aCmd, int aDataLength, void *aData);
1.188 + TDPError receiveMessage(TPCommand* aCmd, int* aDataLength, void* aData);
1.189 +
1.190 +private:
1.191 + bool isValidCMDID(TPCommand aCommand);
1.192 +
1.193 + int iRand_UID;
1.194 + MUCCTransport* iTransport;
1.195 + TBufC16<40> iRemoteHost;
1.196 + TInt64 iRandomSeed;
1.197 + TDPStatus iStatus;
1.198 +
1.199 +};
1.200 +
1.201 +#endif