📄 bluegpsserver.h
字号:
/*****************************************************************************
COPYRIGHT All rights reserved Sony Ericsson Mobile Communications AB 2003.
The software is the copyrighted work of Sony Ericsson Mobile Communications AB.
The use of the software is subject to the terms of the end-user license
agreement which accompanies or is included with the software. The software is
provided "as is" and Sony Ericsson specifically disclaim any warranty or
condition whatsoever regarding merchantability or fitness for a specific
purpose, title or non-infringement. No warranty of any kind is made in
relation to the condition, suitability, availability, accuracy, reliability,
merchantability and/or non-infringement of the software provided herein.
*****************************************************************************/
#if !defined(__BlueGPSServer_H__)
#define __BlueGPSServer_H__
#include <e32std.h>
#include "BlueGPSParser.h"
#include "BlueGPSEngine.h"
#include "BlueGPSClientServer.h"
class CBlueGPSEngine;
class CBlueGPSParser;
// needed for creating server thread.
const TUint KDefaultHeapSize = 0x10000;
// panic reasons
enum TBlueGPSServerPanic
{
EBadRequest,
EBadDescriptor,
EDescriptorNonNumeric,
EMainSchedulerError,
ESvrCreateServer,
ECreateTrapCleanup,
EBadClientSessionRemove,
EBadSubsessionHandle
};
//**********************************
// CBlueGPSServer
//**********************************
class CBlueGPSServer : public CServer
{
public:
enum { EBlueGPSServerPriority = 950 };
private:
CBlueGPSServer();
void ConstructL();
class CShutdownServer : public CActive
{
public:
CShutdownServer();
~CShutdownServer();
void ConstructL();
void Start();
void DoCancel();
void RunL();
static CShutdownServer* NewL();
RTimer iTimer;
};
public:
static void PanicServer( TInt aPanic );
static TInt ThreadFunction( TAny* aStarted );
static CBlueGPSServer* NewL();
~CBlueGPSServer();
CSharableSession* NewSessionL( const TVersion &aVersion ) const;
void SetGPSInfo( const TBlueGPSInfo &aInfo );
void GetGPSInfo( TBlueGPSInfo &aInfo );
void IncrementSessions();
void DecrementSessions();
void SetConnected( TBool aConnected );
void StartEngine();
void StopEngine(); //FFF
TBool IsConnected() { return iConnected; }
void EngineReadAddr();
//TBool iValidEngineAddr;
private:
CBlueGPSEngine *iEngine;
CBlueGPSParser *iParser;
TBool iConnected; // BT connection
RSemaphore iInfoSemaphore;
TBlueGPSInfo iInfo;
TTime iPhoneTime;
TInt iSessionCount;
CShutdownServer* iShutdown;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -