📄 celliddetector.h
字号:
/*
============================================================================
Name : CellidDetector.h
Author : Hatma Suryotrisongko
Version :
Copyright : www.hatma.info
Description : CCellidDetector declaration
============================================================================
*/
#ifndef CELLIDDETECTOR_H
#define CELLIDDETECTOR_H
#include <e32base.h> // For CActive, link against: euser.lib
#include <Etel3rdParty.h> // Starting from S60 2nd Edition, access to telephony functionality and device IMEI/IMSI information was supposed to be provided by the ETEL third-party telephony library (etel3rdparty.dll, class CTelephony).
//#include <etelbgsm.h> // Libraries from Nokia 9200 SDK at least in some older versions
class CCellidDetector : public CActive
{
public:
// Cancel and destroy
~CCellidDetector();
// Two-phased constructor.
static CCellidDetector* NewL();
// Two-phased constructor.
static CCellidDetector* NewLC();
public: // New functions
// Function for making the initial request
void StartL();
// method untuk mengambil informasi cellid saat ini
TUint GetNetworkCellId(TUint& aCellId);
private:
// C++ constructor
CCellidDetector();
// 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 TCellidDetectorState
{
EGetPhoneInfo,
EDone
};
private:
// State of the active object
TInt iState;
// Pointer to a newly created CTelephony object.
CTelephony * iTelephony;
// Defines information related to a mobile phone network.
CTelephony::TNetworkInfoV1 iNetworkInfo;
// Controls a single scheduling loop in the current active scheduler.
CActiveSchedulerWait iActiveSchedulerWait;
// On GSM/WCDMA networks, the cell identity code.
TUint iCellId;
};
#endif // CELLIDDETECTOR_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -