⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcsyn_application.h

📁 是一个手机功能的模拟程序
💻 H
字号:
/*
+-------------------------------------------------------------------+
| PROJECT: PC Synchronization                    
| $Workfile: pcsyn_application.h
| $Author: Talcon Hu
| CREATED: 18.05.2004                 
+-------------------------------------------------------------------+
*/
#ifndef _PCSYN_APPLICATION_
#define _PCSYN_APPLICATION_

typedef enum
{
	App_Error_NoError= 0x00,
	App_Error_UnknownCID1,
	App_Error_UnknownCID2,
	App_Error_UnWritable,
	App_Error_IllegalCmdData,
	App_Error_NoFound,
	App_Error_Default
}App_Error;

typedef enum
{
	PC_AppCID1_File = 0x11,	//file operate
	PC_AppCID1_PHB,             //Phone Book
	PC_AppCID1_SMS,             // SMS
	PC_AppCID1_CR,             //通话记录
	PC_AppCID1_MAX
}PC_AppCID1;

typedef enum
{
	PC_AppCID2_Read = 0x11,  //read
	PC_AppCID2_Write,		  //write,modify,add
	PC_AppCID2_Delete ,         //delete
	PC_AppCID2_Copy,		//copy
	PC_AppCID2_Info,              //base Infomation 
	PC_AppCID2_MAX
}PC_AppCID2;

typedef enum
{
  PC_SMS_status_SendSMS=0x06,
  PC_SMS_status_SaveSendSMS,
  PC_SMS_status_SaveSMS,
  PC_SMS_status_SavetoNVM
}PC_SMS_SendType;


/*************公共变量*********/
extern UINT8 SimNumber[ALL_SIM_LIST][PHB_number_len/2+1];

typedef struct
{
	char name[PHB_name_len+3];
	char number[PHB_number_len+1];
}T_EasyName;

typedef struct
{
  char name[PHB_name_len+3];
  U8  GroupingIcon;
  U8  GroupingRing;
  U8  GroupIndex;
} T_FindName;
/***************************/


/**************phonebook*************/
//when CID1 = PC_AppCID1_PHB
//#define PHB_TYPE_NVM 	0x01 //电话机的电话簿
//#define PHB_TYPE_SIM  	0x04 //SIM卡中的电话簿

/* when cid2== PC_AppCID2_Info,ingore  type and index*/
typedef struct
{
	BYTE cid1;
	BYTE cid2;
	BYTE type;/* PHB_TYPE_NVM,PHB_TYPE_SIM, */	
	BYTE index;//从1开始的电话簿记录索引
}PC_App_Cmd_PHB;

//when CID2 = PC_AppCID2_Info
typedef struct
{
	U16 NVMTotal;
	U16 SIMTotal;
	U16  MaxNVM;
	U16 MaxSIM;
}PC_PHB_Info_dl;


typedef struct
{
	T_MFW_PHB_SELECT phonebook; 	
	ULONG	id;
	PhbkDetailItem phkitem;
}PC_PHB_Content;//81 bytes;but 84 in fact
/************************************/


/************ShortMessage***********/

extern T_MMI_FLASH_SORT_INDEX Flash_sms_sort_index[FLSAH_SMS_NUM];
#ifdef PHONEBOOK_EXTENSION
#define NUMBER_LENGTH			41
#else
#define NUMBER_LENGTH			22	/* 2003/12/29 sunsj modify phone editor size in sms */
#endif

extern UBYTE* mmi_Sys_Sim(char* intxt, USHORT * len,SHORT *dcs);
extern T_MFW_MEM_INFO     memory;


typedef enum
{
	PCSYN_SMS_UNKNOWN,
	PCSYN_SMS_UNREAD,       /* received unread message */
	PCSYN_SMS_READ,         /* received read message   */
	PCSYN_SMS_STOR_UNSENT,  /* stored unsent messgae   */
	PCSYN_SMS_STOR_SENT,    /* stored sent message     */
	PCSYN_SMS_ALL,
	PCSYN_SMS_NotVOICE,
	PCSYN_SMS_FLASH,       /*FLASH SMS*/
	PCSYN_SMS_FLASH_MO,  
	PCSYN_SMS_FLASH_MT,  
	PCSYN_SMS_MO,           /* MO SMS message          */
	PCSYN_SMS_MT,           /* MT SMS message          */
	PCSYN_SMS_INVALID   ,/*SPR1830*/
	PCSYN_SMS_VOICE        /* voice mail message */
} T_PCSYN_SMS_STAT;


typedef struct
{
	BYTE cid1;
	BYTE cid2;
	BYTE type;	
	BYTE index;
}PC_App_Cmd_SMS;

typedef struct
{
	BYTE  FlashMOtotal;
	BYTE  FlashMTtotal;
	BYTE  SIMMOTotal;
	BYTE  SIMMTTotal;
	SHORT MaxFlashNum;
	SHORT MaxSIMNum;
}PC_SMS_Info_dl;

#if 0
typedef struct
{
	char name[PHB_name_len+3];
	FlashSms flashsmsitem;
}PC_SMS_Content;//81 bytes;but 84 in fact
#else
typedef struct
{
	char 	name[16];
	UBYTE	id;
	char    	addr[40];
	T_MFW_SMS_SCTP   time;
	SHORT    dcs;
	BYTE  	state;
	BOOL    	flag;
	SHORT  	msg_len;
	char    	sms_msg[2];/**/
}PC_SMS_Content;//81 bytes;but 84 in fact
#endif


typedef struct
{
	SHORT ctype;
	SHORT index;
}DelRec;
/*************************************/


/**************CallRecord*************/
//when CID1 = PC_AppCID1_CR
#define CR_TYPE_LMN 	0x01 //未接电话
#define CR_TYPE_LRN 	0x04 //已接电话
#define CR_TYPE_LDN		0x08 //已拨电话

//call record ul buffer
/* when cid2== PC_AppCID2_Info,ingore  type and index*/
typedef struct
{
	BYTE cid1;
	BYTE cid2;
	BYTE type;/*
				CR_TYPE_LMN
				CR_TYPE_LRN
				CR_TYPE_LRN
			  */	
	BYTE index;//基于0的通话记录的索引
}PC_App_Cmd_CR;

//call record dl buffer
//when CID2 = PC_AppCID2_Info
typedef struct
{
	BYTE  LMNID;
	BYTE  LRNID;
  	BYTE  LDNID;
}PC_CR_Info_dl;

/*****************************
通话记录的内容
--------------------------------
|电话号码|  姓名  |   时间  |
---------------------------------
|24 bytes|24 bytes|21 bytes |
---------------------------------
********************************/
typedef struct
{
	BYTE content[24  + 24 + 21];
}PC_CR_Content;
/***************************/

/**************file operate*************/
typedef struct
{
	BYTE cid1;
	BYTE cid2;
	BYTE file[50];
}PC_App_Cmd_File;

typedef struct
{
	T_FFS_STAT stat;
	int  fnsize;
}PC_FILEHead_info_dl;

/***************************/


typedef struct
{
	unsigned int size;
	BYTE data[64];
}PC_App_Cmd;

/*
*flag:
	0x01: write data to target
	0x02: transfer cmd to target
*/
unsigned int  pc_interface(PC_Interface_Info * info);


#endif





















⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -