




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、BREW的介紹,2003年7月,什么是BREW,BREW: Binary Runtime Environment for wireless(二進(jìn)制運(yùn)行環(huán)境) Brew是一個(gè)無(wú)線平臺(tái),通過(guò)COM風(fēng)格的API提供給上層應(yīng)用。 B:Binary,API是二進(jìn)制庫(kù)的集合。應(yīng)用程序可以被編譯和鏈結(jié)到特定的處理器(如ARM) R:Runtime,Applications and extensions are discovered at run time E:Environment,BREW provides a wealth of APIs and application management servi
2、ces. W:For wireless .BREW is a fast ,efficient,low RAM/FLASH enviroment,and specifically developed for wireless devices to allow applications to take advantage of wireless servieces,BREW結(jié)構(gòu),BREW結(jié)構(gòu),1、Device Layer Provides Primitives OS and Deviece Driver Functionality 2、OEM layer Provides services to
3、the AEE layer natively or through the Device Layer ChiL(Chip Interface Layer)Provides Baseband Chip Specific Services(e.g. GPS,Socket) MIL(Mobile Interface Layer) Provides Generic Baseband Chip Independent services(e.g. Database,Heap) 3、AEE layer Provides a uniform API to applications,BREW 文件和目錄,所有的
4、BREW文件和目錄名字都是小寫字母 BREW3.0將允許大小寫的文件名 四種文件類型 MIF:Module information File BAR:BREW Applet Resource File MOD:Binary Module File SIG:Digital Signature File,MIF,This file type contains information about each Module.Each module can contain One or More BREW applets or Extensions,and this type of file contai
5、ns information such as: Applet ClassIDs,names,Images,and settings General module information in text Privilege levels Exported ClassIDs and MIME types Module dependencies,BAR and MOD file,BAR: this file type contains the application resources:text strings,images and dialogs.This file type is used by
6、 the MOD files during execution.the BAR files are generated from BREW resource intermediate files(BRI) MOD: This file type is the dynamically loaded module executed at runtime.The applet Source files are compiles and linked into this MOD file type SIG: This file typecontains Digital Signature inform
7、ation to ensure the Integrity of each applet.When a Module is downloaded,this Signature file is verified by validating the binary and resource files,BREW Stacking and Management,BREW applet stacking Only one applet is visible at a time BREW maintains history list of application that have started and
8、 suspended Allows mix of OEM UI/MMI and BREW applets Allows one or more BREW applets to be started in sequences and mixed with OEM UI dialogs or applications BREW applets can run in the background if no display or keypad interaction is needed,BREW key Handling,When BREW is active,all key events need
9、 to be channeled to BREW after converting to AEE Virtual key code(AVK_*)of type AVKType There are four types of BREW Key Event: EVT_KEY_PRESS:sent when key is pressedcan be sent through AEE_KeyPress() EVT_KEY_RELEASE:Sent when key is releasedcan be sent through AEE_KeyRelease(),BREW key Handling,EVT
10、_KEY:Sent immediate after EVT_KEY_PRESS or Before EVT_KEY_RELEASE depending on the native UIs behavior EVT_KEY_HELD:Sent for keys being held Simultaneous key press is supported,BREW Classes,BREW uses COM style Interface Components can be dynamically interchanged without breaking old client It consis
11、ts if a well-defined interface and component implementations Exposed through VTBL All instances of the same class share the same VTBL Most BREW classes are reference counted to conserve memory,BREW classessingle Instance,Client,Interface vtbl Interface obj,BREW classesmultiple Instance,Client,Interf
12、ace vtbl obj 1 obj2,BREW Classes,Sample BREW Interface Declare Interface VTBL File: MyInterface.h Typedef struct IMyInterface IMyInterface; AEEINTERFACE(IMyInterface) DECALRE_Ibase(IMyInterface); int (*MyFunction1)(IMyInterface * po,int a); int (*MyFunction2)(IMyInterface * po); int (*MyFunction3)(I
13、MyInterface * po,boolean b); ;,BREW Classes,Define Function Macros #define IMYINTERFACE_Add(p) AEEGETPVTBL(p),IMyInterface)-AddRef(p) #define IMYINTERFACE_Release(p) AEEGETPVTBL(p),IMyInterface)-Release(p) #define IMYINTERFACE_MyFunction1(p,a) AEEGETPVTBL(p),IMyInterface)-MyFunction1(p,a) #define IM
14、YINTERFACE_MyFunction2(p) AEEGETPVTBL(p),IMyInterface)-MyFunction2(p) #define IMYINTERFACE_MyFunction3(p) AEEGETPVTBL(p),IMyInterface)-MyFunction3(p,b),BREW CLasses,Declare interface Class FILE: MyInterface.c Struct IMyInterface const AEEVTBL(IMyInterface)* pvt; int m_myData1; int m_myData2; int m_m
15、yData3; ;,BREW Classes,Define Interface VTBL Static const VTBL(IMyInterface) gMyFuncs = CMyInterface_AddRef, CMyInterface_Release, CMyInterface_MyFunction1, CMyInterface_MyFunction2, CMyInterface_MyFunction3 ;,BREW Classes,Interface Class Constructor int CMyInterface_New(Ishell * pIShell,AEECLSID cl
16、sid,void* pi) IMyInterface *pMe; *pi = 0; if(AEECLSID_MYCLSID != clsid) return EUNSUPPORTED; pMe = MALLOCREC(IMyInterface); if(!pMe) return ENOMEMORY; *pi = (void*)pMe; pMe-pvt = gMyFuncs; pMe-m_MyData1 = 0; . return SUCCESS; ,BREW Classes,IMyInterface,IMyInterface,BREW Classes,Many BREW Classes use
17、 Reference counting to conserve memory Reference counted objects are shared Objects are create when first used Subsequent creation of objects increments reference count through AddRef() Deletion of objects decrements reference count through Release() and last deletion destroys objects All BREW Class
18、es derive from Ibase and It declares AddRef() and Release() methods,BREW Classes,AddRef Increments reference count Object is created only the first time,Object,Client3,Client2,Client1,Create()/AddRef()/RefCnt=1,AddRef()/RefCnt=2,AddRef()/RefCnt=3,BREW Classes,Release Decrements reference count Objec
19、t is destroyed when reference count reachs zero,Object,Client3,Client2,Client1,Release()/RefCnt=2,Release()/RefCnt=1,Release()/RefCnt=0/Destroy(),OEM modules and classes,BREW is highly featurized and allows customization of handsets by adding or removing modules either statically or dynamically BREW
20、 modules are a collection of BREW classes Dynamic modules and classes are recognized through MIF file at run time Static modules and classes are organized in OEM mod table and featurized Features are defined in OEMFeatures.h,OEM Modules and Classes,Static BREW Modules Static BREW modules need Modinf
21、o functions to return module information: PFNMODENTRY MyMod_GetModInfo(Ishell* ps, AEECLSID* ppClasses,AEEAppInfo* pApps,unit16* pnApps,unit16* pwMinPriv); The function returns the entry point to a module Modinfo functions need to be externed extern PFNMODENTRY MyMod_GetModInfo(Ishell* ps, AEECLSID* ppClasses,AEEAp
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 跳棋教學(xué)課件
- 混合式教學(xué)課件
- 在宇宙的另一邊教學(xué)課件
- 吳勤學(xué) 教學(xué)課件
- 【定西】2025年甘肅定西市第二批赴外引進(jìn)人才434人筆試歷年典型考題及考點(diǎn)剖析附帶答案詳解
- 2025下半年廣安市公開考試招聘事業(yè)單位工作人員108人筆試歷年典型考題及考點(diǎn)剖析附帶答案詳解
- 易錯(cuò)點(diǎn)20 中國(guó)精神-備戰(zhàn)2021年中考道德與法治一輪復(fù)習(xí)易錯(cuò)題
- 【鄭州】2025年中國(guó)(河南)自由貿(mào)易試驗(yàn)區(qū)鄭州片區(qū)管委會(huì)招聘10人筆試歷年典型考題及考點(diǎn)剖析附帶答案詳解
- 無(wú)紙化測(cè)試活動(dòng)方案
- 文聯(lián)年會(huì)活動(dòng)方案
- 2025年廣東省高考語(yǔ)文試卷(含標(biāo)準(zhǔn)答案)
- 中國(guó)熱射病診斷與治療指南(2025版)
- 公共藝術(shù)裝置項(xiàng)目管理流程
- 2025年下半年佛山市南海區(qū)建筑工程質(zhì)量檢測(cè)站招考編外工作人員易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- GB/T 45610-2025煤矸石回填塌陷區(qū)復(fù)墾技術(shù)規(guī)程
- 中醫(yī)基礎(chǔ)執(zhí)業(yè)醫(yī)師考試試題及答案
- 2025-2030年中國(guó)寫字樓行業(yè)市場(chǎng)深度調(diào)研及前景趨勢(shì)與投資研究報(bào)告
- 人教版(2024)七年級(jí)下冊(cè)英語(yǔ)Unit 8 Once upon a Time單元集體備課教案(共5課時(shí))
- 診所托管合同協(xié)議
- 質(zhì)量檢驗(yàn)(測(cè))技術(shù)服務(wù)企業(yè)數(shù)字化轉(zhuǎn)型與智慧升級(jí)戰(zhàn)略研究報(bào)告
- 信息必刷卷04(廣東省卷專用)2025年中考數(shù)學(xué)(解析版)
評(píng)論
0/150
提交評(píng)論