chxavaccesspointdb.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:2k
- /************************************************************************
- * chxavaccesspointdb.h
- * --------------------
- *
- * Synopsis:
- * Access point utility routines. We use this class to look up mappings
- * between strings and ids.
- *
- *
- * Target:
- * Symbian OS
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- ************************************************************************/
- #ifndef _chxavaccesspointdb_h_
- #define _chxavaccesspointdb_h_
- // Symbian includes...
- #include <coeutils.h>
- #include <aknenv.h>
- #include <commdb.h>
- #include <apengineconsts.h>
- // Helix includes...
- #include "hxslist.h"
- // Include from this project...
- #include "chxavrefptr.h"
- struct AccessPointInfo
- {
- CHXString name;
- TUint32 id;
- TUint32 service;
- TUint32 wapId;
- };
- typedef AccessPointInfo* AccessPointInfoPtr;
- // class CHXAvAccessPointDB...
- class CHXAvAccessPointDB : public CBase
- {
- public:
- // ctor and dtor...
- CHXAvAccessPointDB();
- virtual ~CHXAvAccessPointDB();
- void ConstructL();
- // Methods...
- AccessPointInfoPtr GetAPInfo(TUint32 iapId);
- HBufC* AllocAccessPointNameL(TUint32 iapId);
- TUint32 GetAPIdFromWapIdL(TUint32 wapApId);
- TUint32 GetWapIdFromAPIdL(TUint32 iapId);
- TUint32 GetIapIDFromNameL(const CHXString& name);
- bool SupportsInternetAccessL(TUint32 wapId);
- bool IsValidL(TUint32 iapId);
- refptr<CCommsDatabase> GetDatabase();
- private:
- void GetAllAccessPointsL();
- void ClearAccessPointsList();
- bool OpenDBL();
- void CloseDB();
-
- // Data...
- refptr<CCommsDatabase> m_spDatabase;
- refptr<CCommsDbTableView> m_spTable;
- CHXSimpleList *m_accessPoints;
- bool m_isOpen;
- };
- inline
- refptr<CCommsDatabase> CHXAvAccessPointDB::GetDatabase()
- {
- return m_spDatabase;
- }
- #endif // _chxavaccesspointdb_h_