Knowledge Base Nr: 00070 HandySupport.cpp - http://www.swe-kaiser.de

Downloads:

CHandySupport class:
SMS Status aus Handy via RS232 auslesen (incl. PDU Konvertierung)

  
class CHandySupport
{
public:
CHandySupport(const char* lpszPort);
virtual ~CHandySupport();

int CHandySupport::GetSMS(char* szSMS, bool bUnreadOnly = true);
//returns number of unread sms or a negative value for error (szSMS contains error text)
//sms within szSMS will be separated by '\n'

FILE* GetLogFileFP() { return m_fpLogfile; }
void SetLogFileFP(FILE* fp) { m_fpLogfile = fp; }

protected:
void WriteLog(const char *szHeader, const char* szFormat, ...);

int ConvertPDUtoASCII(char* szRecv, char* szASCII);
unsigned char ISOtoASCII(unsigned char cISO);
char* ASCIItoBitString(unsigned char c);

private:
char m_szPort[20];
FILE* m_fpLogfile;
};