freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

vcalendar的跨平臺(tái)系統(tǒng)的設(shè)計(jì)—畢業(yè)設(shè)計(jì)論文(編輯修改稿)

2024-09-02 05:23 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 在 PC 與軟件連接中,傳遞給界面一些參數(shù),讓界面來根據(jù)文件配置加載相應(yīng)的功能,不僅對(duì)于該模塊需要實(shí)現(xiàn) getProf 函數(shù),所有模塊都需要根據(jù)該模塊的特性來重寫接口:int MotoVcs::getProf(AbsFile *prof){int ret, titleLen。char rsp[256]。if (thisvcsProfObj) {profprintf(prof, %s, thisvcsProfObj)。AbsFile_dbgOut(prof)。return 0。}if ((ret = enter()) 0) {TRACE_LINE()。return ret。}// rsp: ..+MDBR: 500,44,64,8,2....OK.. if ((ret = AtTe_getAny(thisat, +MDBR=?, +MDBR, +CME, rsp, sizeof(rsp), NULL)) 0)return ret。AbsFileMem_reset(thisrspBuf, rsp, sizeof(rsp), ret, 0)。if ((ret = AtLex_do(thisrspBuf, thistoken)) != AT_ATOM)return CNSE_PROT。// 500if ((ret = AtLex_do(thisrspBuf, thistoken)) != AT_NUM) return CNSE_PROT。if ((ret = AtLex_do(thisrspBuf, thistoken)) != 39。,39。) return CNSE_PROT。// 44if ((ret = AtLex_do(thisrspBuf, thistoken)) != AT_NUM) return CNSE_PROT。if ((ret = AtLex_do(thisrspBuf, thistoken)) != 39。,39。) return CNSE_PROT。// 64if ((ret = AtLex_do(thisrspBuf, thistoken)) != AT_NUM) return CNSE_PROT。titleLen = atoi(StrBuf_buf(thistoken))。profprintf(prof, [Base]\r\n)。profprintf(prof, OpSupp=getInfo,listById,writeById,readById,removeById\r\n)。profprintf(prof, [FieldListEvent]\r\n)。profprintf(prof, (T)(%d)(UNICODE)=\r\n, titleLen * 2)。profprintf(prof, (DA)(60)(UNICODE)=\r\n)。profprintf(prof, (DS)(60)(UNICODE)=\r\n)。profprintf(prof, (DE)(60)(UNICODE)=\r\n)。profprintf(prof,(R)(60)(UNICODE)=selList(0,1,2,3,4,6)\r\n。return 0。}在 absfile 中會(huì)得到信息:[Base]OpSupp=listById,readById,writeById,removeById,getInfo[FieldListEvent](T)(%d)(UNICODE)=(DA)(60)(UNICODE)=(DS)(60)(UNICODE)=(DE)(60)(UNICODE)=(R)(60)(UNICODE)=selList(0,1,2,3,4,6)從該配置信息可以看出支持操作有:下載、讀取、新增、刪除。同時(shí)也傳遞給界面所支持的字段有:T、DA、DS、DE、R 和對(duì)每一個(gè)字段編碼方式、字符長(zhǎng)度作了約束。其中 selList 中選項(xiàng)表示可能的取值。 構(gòu)造函數(shù)實(shí)現(xiàn)構(gòu)造函數(shù)中分為該功能模塊構(gòu)造、和操作時(shí)的構(gòu)造,但都是為了能滿足對(duì)內(nèi)存堆棧申請(qǐng)、操作時(shí)對(duì)事件或者日程安排的開關(guān):(1)功能模塊構(gòu)造:實(shí)現(xiàn)對(duì)虛擬文件的堆棧分配、存儲(chǔ)信息的堆棧分配,還有相關(guān)信息的初始化。MotoVcs::MotoVcs(ItfMng *itfMng, AtTe *_at, char *_vcsProfObj): PlugBase(itfMng){thisat = _at。thisrspBuf = AbsFileMem_new(NULL, 0, 0, 0)。thistoken = StrBuf_new(128)。thismaxReadPerTime = 1。thiscs[0] = 39。\039。thisvcsProfObj = _vcsProfObj。}(2)功能操作構(gòu)造:當(dāng)要對(duì) vEvent 或者 vTodo 操作時(shí)候,根據(jù)系統(tǒng)的設(shè)計(jì),需要設(shè)置信息開關(guān) +MDBL=1,否則不能讀取和其余操作,設(shè)置編碼方式,但都需要先從手機(jī)中讀取,然后根據(jù)支持操作來設(shè)置編碼,界面都是統(tǒng)一按照UTF8 編碼數(shù)據(jù)、該款手機(jī)優(yōu)先支持 UCS2 編碼,這些是由手機(jī)系統(tǒng)所決定。int MotoVcs::init(){int ret。char buf[128], *cs。CnsCharset charset。if (((ret = AtTe_setAny(thisat, +MDBL=1, +CME, NULL)) 0) amp。amp。 (NetUtil_isFaultErr(ret))) return ret。if ((ret = GmcTe3_testCs(thisat, buf, sizeof(buf))) 0) {if (NetUtil_isFaultErr(ret))return ret。else return 0。}else {//先支持 UCS2 編碼if (StrUtil_stristr(buf, UCS2)) {charset = CS_UCS2。cs = UCS2。 }else if (StrUtil_stristr(buf, UTF8)) {charset = CS_UTF8。cs = UTF8。else if (StrUtil_stristr(buf, UTF8)) {thisutf8Ira = CNS_TRUE。charset = CS_UTF8。cs = UTF8。}else {charset = CS_ASCII。cs = GSM。}if (*thiscs) {cs = thiscs。if (StrUtil_stristr(cs, UTF8))charset = CS_UTF8。// for MOTOselse if (StrUtil_stristr(cs, UTF8)) {charset = CS_UTF8。thisutf8Ira = CNS_TRUE。}else if (StrUtil_stristr(cs, UCS2))charset = CS_UCS2。elsecharset = CS_ASCII。}if ((ret = GmcTe3_setCs(thisat, cs)) 0) {if (NetUtil_isFaultErr(ret))return ret。elsereturn 0。}thischarset = charset。thissavedCharset = thischarset。}return 0。} 信息獲取 在對(duì)事件或者日程下載時(shí)候,會(huì)兩次操作接口 getInfo,第一次傳遞給界面信息如:最大索引、存儲(chǔ)容量、剩余空間、有的可以讀取出使用量等信息。第二次得到最大索引、存儲(chǔ)容量等信息,給循環(huán)控制參數(shù),用來設(shè)置讀取時(shí)候方式。對(duì)于串口緩沖區(qū)中數(shù)據(jù)都是通過 AtLex_do,或者 BnfLex_do 來對(duì)字段解析。然后保存到變量中,這種讀取方式是在操作內(nèi)存文件。int MotoVcs::getInfo(StrBuf* did, int* capa, int* used, int* freed, int *indexLow, int* indexHigh, int* indexOwn){int ret。char rsp[256]。if ((ret = enter()) 0)return ret。if (capa) *capa = 1。if (used) *used = 1。if (freed)*freed = 1。if (indexLow) *indexLow = 1。if (indexHigh) *indexHigh = 1。// rsp: ..+MDBR: 500,44,64,8,2....OK.. if ((ret = AtTe_getAny(thisat, +MDBR=?, +MDBR, +CME, rsp, sizeof(rsp), NULL)) 0)return ret。AbsFileMem_reset(thisrspBuf, rsp, sizeof(rsp), ret, 0)。if ((ret = AtLex_do(thisrspBuf, thistoken)) != AT_ATOM)return CNSE_PROT。if ((ret = AtLex_do(thisrspBuf, thistoken)) != AT_NUM) return CNSE_PROT。if (capa)*capa = atoi(StrBuf_buf(thistoken))。if (indexLow) *indexLow = 0。if (indexHigh) *indexHigh = atoi(StrBuf_buf(thistoken)) 1。if ((ret = AtLex_do(thisrspBuf, thistoken)) != 39。,39。)return CNSE_PROT。if ((ret = AtLex_do(thisrspBuf, thistoken)) != AT_NUM) return CNSE_PROT。if (used) *used = atoi(StrBuf_buf(thistoken))。if (indexOwn) *indexOwn = 1。return 0。} 數(shù)據(jù)下載當(dāng)打開讀取開關(guān)后,更具讀取 AT 命令,設(shè)置讀取的條數(shù),也就是一次讓手機(jī)返回給串口緩存數(shù)據(jù)包大小,可以一次讀取一條信息,也可以一次讀取十條信息。Motoralor 系列手機(jī)不能首先得到有多少條信息記錄,所以只能讀取所有的記錄,即使只有一條也會(huì)讀取全部信息,由于每次解析一條,所以會(huì)多次調(diào)用 listById 接口。每一次調(diào)用,都是讀取緩存數(shù)據(jù),然后根據(jù)前面章節(jié)中提到的字段依次解析存放到一個(gè)結(jié)構(gòu)體中,對(duì)標(biāo)題、日期等都需要經(jīng)過編碼后載保存。由于 Motoralor 系列手機(jī)不能直接讀取出結(jié)束時(shí)間,只能得到開始時(shí)間到結(jié)束時(shí)間的分鐘數(shù),不足一分鐘會(huì)置為 0 保存,然后通過函數(shù)換算成結(jié)束日期和時(shí)間,最后讀取保存的字段、字段值寫成一個(gè)標(biāo)準(zhǔn)格式的 vCalendar 內(nèi)存文件傳遞給界面,用于顯示給用戶:int MotoVcs::listById(int *index, AbsFile *item, CnsBool first){int ret, tmp。char cmd[64]。if ((ret = enter()) 0)return ret。if (first) {if ((ret = getInfo(NULL, NULL, amp。thisused, NULL, amp。thisindexLow, amp。thisindexHigh, NULL)) 0)return ret。if (thisused == 0 || ((tmp = thisindexHigh thisindexLow + 1) == 0))return 0。thislisted = 0。thiscurIndex = thisindexLow + min(thismaxReadPerTime, tmp)。sprintf(cmd, +MDBR=%d,%d, thisindexLow, thiscurIndex 1)。if ((ret = AtTe_sendCmd(thisat, cmd)) 0) return ret。}ret = readOne(index, item)。if (ret == 1) {AbsFile_dbgOut(item)。thislisted++。return ret。}else if (ret 0) return ret。else if (ret == 0) {if (thisused = 0 amp。amp。 thislisted = thisused)return 0。while ((tmp = thisindexHigh thiscurIndex + 1) 0 amp。amp。 (thisused 0 || thislisted th
點(diǎn)擊復(fù)制文檔內(nèi)容
化學(xué)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1