📄 mobilesyncdlg.h
字号:
// MobileSyncDlg.h : header file
//
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES
#if !defined(AFX_MOBILESYNCDLG_H__4FEC6BA9_B2C3_4D08_85AC_33723F158080__INCLUDED_)
#define AFX_MOBILESYNCDLG_H__4FEC6BA9_B2C3_4D08_85AC_33723F158080__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "OPUS_typedef.h"
/////////////////////////////////////////////////////////////////////////////
// CMobileSyncDlg dialog
typedef struct
{
OP_UINT8 Device;
OP_UINT16 Record;
WCHAR Name[17];
CHAR Mobile[33];
CHAR Home[33];
CHAR Office[33];
CHAR Email[64];
CHAR Qq[11];
WCHAR Memo[31];
OP_UINT8 Group;
OP_UINT32 Portrait;
} PBOOK_ITEM_T;
typedef struct
{
OP_UINT8 ListType;
OP_UINT8 StorageType;
OP_UINT8 MsgType;
OP_UINT8 MsgRef;
OP_UINT8 Status;
OP_UINT8 ServiceCenter[22];
OP_UINT8 TimeStamp[7];
OP_UINT8 Number[22];
OP_UINT32 MsgLen;
OP_UINT8 *pContent;
} SMS_ITEM_T;
class CMobileSyncDlg : public CDialog
{
// Construction
private:
void OutText(LPCSTR pText);
void OutText(BYTE btText);
OP_BOOLEAN comm_base64_decode(const OP_UINT8 *pSrc, OP_UINT16 SrcLen,
OP_UINT8 *pDest, OP_UINT16 *pDestLen);
OP_BOOLEAN comm_base64_encode(const OP_UINT8 *pSrc, OP_UINT16 SrcLen,
OP_UINT8 *pDest, OP_UINT16 *pDestLen);
OP_UINT16 comm_checksum(const OP_UINT8 *pData, OP_UINT16 DataLen);
void comm_send_error(void);
void comm_send_command(OP_UINT8 *pCmdData, OP_UINT16 CmdLen);
void comm_process_package(CString &strRecvData);
OP_BOOLEAN syncPbookItemToStream(PBOOK_ITEM_T *pstPbookItem, OP_UINT8 *pPbookData, OP_UINT16 *pDataLen);
void OutPbook(PBOOK_ITEM_T *pbitem);
void OutSms(SMS_ITEM_T *smsitem);
OP_BOOLEAN syncSmsItemToStream(SMS_ITEM_T *pstSmsItem, OP_UINT8 *pSmsData, OP_UINT16 *pDataLen);
private:
int m_nMode;
CString m_strRecvData;
OP_UINT8 *m_pfBuff;
OP_UINT32 m_nfSize;
OP_UINT32 m_nOffset;
OP_UINT32 m_nLength;
CString m_strfName;
OP_UINT8 m_nfCount;
COleDateTime m_preTime;
public:
CMobileSyncDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMobileSyncDlg)
enum { IDD = IDD_MOBILESYNC_DIALOG };
CRichEditCtrl m_EditCtrl;
CListCtrl m_HeaderList;
CMSComm m_comm;
int m_nMelodyCmd;
int m_nRadioInbox;
int m_nRadioSim;
int m_nRadioSms;
int m_nComboPort;
int m_nEditIndex;
int m_nComboCount;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMobileSyncDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMobileSyncDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnOpenPort();
afx_msg void OnOnCommMscomm1();
afx_msg void OnDownload();
afx_msg void OnCount();
afx_msg void OnInquire();
afx_msg void OnDelete();
afx_msg void OnUpload();
afx_msg void OnPbStatus();
afx_msg void OnPbSave();
afx_msg void OnPbRead();
afx_msg void OnPbDelete();
afx_msg void OnPbUpdate();
afx_msg void OnPbDeleteall();
afx_msg void OnSmsSend();
afx_msg void OnSmsStore();
afx_msg void OnSmsStatus();
afx_msg void OnSmsRead();
afx_msg void OnSmsDelete();
afx_msg void OnCommRequest();
afx_msg void OnCommTerminate();
afx_msg void OnCommModel();
afx_msg void OnButtonPortrait();
afx_msg void OnClosePort();
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MOBILESYNCDLG_H__4FEC6BA9_B2C3_4D08_85AC_33723F158080__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -