?? securesocketcore.h
字號:
/*
============================================================================
Name : SecureSocketCore.h
based on : http://www.symbian.com/developer/techlib/v9.2docs/doc_source/examples/NetworkingEx/SSLExampleCode.guide.html#NetworkingEx%2eSSLExampleCode
Author : Konstantine; Company: Fishnest Ukraine Sebastopol
Version :
Support : bluspan@gmail.com
Description : CSecureSocketCore declaration
============================================================================
*/
#ifndef SECURESOCKETCORE_H
#define SECURESOCKETCORE_H
#include <e32base.h> // For CActive, link against: euser.lib
#include <e32std.h> // For RTimer, link against: euser.lib
//== konstantine_entrance : mycode
#include <in_sock.h>
#include <SecureSocket.h>
#include "RBufConsoleObserver.h"
//== <- my
class CSecureSocketCore : public CActive
{
public:
// Cancel and destroy
~CSecureSocketCore();
// Two-phased constructor.
static CSecureSocketCore* NewL();
// Two-phased constructor.
static CSecureSocketCore* NewLC();
//== Konstantine_entrance : mycode
// ---! Secure connection !---
TInt iPort;
TPtr8 iSndBuffer;
TPtr8 iRcvBuffer;
/** #bytes received */
TInt iTotalBytesRead;
TInetAddr iAddress;
RSocket iSocket;
RSocketServ iSocketServer;
TSockXfrLength iBytesSent;
CSecureSocket* iTlsSocket;
// To save logs into RBuf console
CRBufConsoleObserver *iRBufConsoleObserver;
// ---! Methods !---
void SetRBufConsoleObserver(CRBufConsoleObserver *aObserver);
void ConnectL() ;
void MakeSecureConnectionL();
void MakePageRequestL() ;
void GetServerResponseL() ;
void ReadServerResponseL() ;
void ConnectionStop() ;
//== <- my
public: // New functions
// Function for making the initial request
void StartL( TTimeIntervalMicroSeconds32 aDelay );
private:
// C++ constructor
CSecureSocketCore();
// Second-phase constructor
void ConstructL();
private: // From CActive
// Handle completion
void RunL();
// How to cancel me
void DoCancel();
// Override to handle leaves from RunL(). Default implementation causes
// the active scheduler to panic.
TInt RunError( TInt aError );
private:
enum TSecureSocketCoreState
{
EUninitialized, // Uninitialized
EInitialized, // Initalized
EMakingSecureConnection,
EMakingPageRequest,
EGettingServerResponse,
EDataReceived,
EStopping, // Going to stop
EStopped, // Stopped
EError // Error condition
};
private:
TInt iState; // State of the active object
RTimer iTimer; // Provides async timing service
};
#endif // SECURESOCKETCORE_H
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -