#ifndef __GSMDEVICE_H__ class GsmDevice { public: GsmDevice(); ~GsmDevice(); bool open(); bool close(); // 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 send(CString& str); bool receive(CString &str); void flush(); private: HANDLE m_hRilDev; HANDLE m_hRil; HANDLE m_hCom; bool ReceiveData(BYTE *buf, int maxlen, DWORD *pnRead); bool SendEndOfMessage(); bool SendByte(BYTE c); bool SendData(BYTE *buf, DWORD len); }; #define __GSMDEVICE_H__ #endif