123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef __WIRELESSDEVAGENT_SAFE_CLIENT_H
- #define __WIRELESSDEVAGENT_SAFE_CLIENT_H
- #pragma once
- #include "../mod_WirelessDevAgent/WirelessDevAgent_client_g.h"
- #include "../mod_WirelessDevAgent/WirelessDevAgent_msg_g.h"
- #include "MobileDialFSM.h"
- namespace MySpace {
- //class CMobileDialFSM;
- class WirelessAgentSafeClient
- {
- class WirelessDevClient : public WirelessDevAgent::WirelessDevService_ClientBase
- {
- public:
- explicit WirelessDevClient(CEntityBase* base):WirelessDevService_ClientBase(base){}
- };
- public:
- explicit WirelessAgentSafeClient(CMobileDialFSM* fsm);
- ~WirelessAgentSafeClient(void);
- ErrorCodeEnum IsActive(BOOL& isActive, BOOL& isConnected);
- ErrorCodeEnum GetAPNConfigs(int slotID, int& count, bool onlySimInfo = false, bool bClear = true);
- ErrorCodeEnum GetAPNConfigsPure(int nIndex, int& count);
- ErrorCodeEnum GetSIMInfo(int slotID, int& count);
- ErrorCodeEnum SetDefaultSlot(int slotIdx);
- ErrorCodeEnum DeleteProfile(int profileID);
- ErrorCodeEnum UpdateOrInsertAPN(int slotID, const AccessKeyInfo& newInfo, bool fApplyNow, int updateProfileID = 0);
- ErrorCodeEnum ConnectWithDefault();
- private:
- BOOL BeSureClientConnected(BOOL reConnnect = FALSE);
- void CloseSession();
- inline void _UpdateProfileInfo(ptMbnProfileInfo profileInfo, WirelessDevAgent::WirelessDevService_GetAPNConfigs_Ans& ans, int i);
- private:
- WirelessDevClient* _client;
- BOOL _connected;
- ErrorCodeEnum _lastError;
- CMobileDialFSM* _fsm;
- CRITICAL_SECTION cs_4_connect;
- };
- }
- #endif //__WIRELESSDEVAGENT_SAFE_CLIENT_H
|