/* (C) 2003 XDA Developers itsme@xs4all.nl * * $Header$ */ #ifndef __GSMDEVICE_H__ #include //#include "ril.h" class GsmDevice { public: GsmDevice(); ~GsmDevice(); bool open(); bool close(); bool EnableRIL(); bool DisableRIL(); bool Reset(); // unfortunately CString doesn't seem to have a method returning a const char* // now I have to unconst everything. //bool vspsend(int channel, CString& str); //bool vspreceive(int channel, CString &str); bool dataWaiting(); bool send(const std::string& str); bool receive(std::string &str); void flush(); bool EraseBlock(DWORD addr); bool WriteBlock(DWORD addr, const BYTE *buf, DWORD nSize); bool ReadBlock(BYTE *buf, DWORD addr, DWORD nSize); private: HANDLE m_hCom; // HRIL m_hRil; HANDLE m_hRilDev; bool ReceiveData(BYTE *buf, int maxlen, DWORD *pnRead); bool SendEndOfMessage(); bool SendByte(BYTE c); bool SendData(BYTE *buf, DWORD len); }; #define __GSMDEVICE_H__ #endif