版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、BREW的介紹,2003年7月,什么是BREW,BREW: Binary Runtime Environment for wireless(二進(jìn)制運(yùn)行環(huán)境) Brew是一個(gè)無線平臺(tái),通過COM風(fēng)格的API提供給上層應(yīng)用。 B:Binary,API是二進(jìn)制庫的集合。應(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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年學(xué)生寢室衛(wèi)生的管理制度細(xì)則
- 速寫的課程設(shè)計(jì)
- 二零二五版電商平臺(tái)電商平臺(tái)數(shù)據(jù)分析與產(chǎn)品優(yōu)化合同3篇
- 年度特種變壓器戰(zhàn)略市場規(guī)劃報(bào)告
- 2025年度社區(qū)停車位產(chǎn)權(quán)轉(zhuǎn)讓協(xié)議范本4篇
- 2025年度鋅錠國際貿(mào)易結(jié)算服務(wù)合同3篇
- 2025年度智能大樓能源管理系統(tǒng)施工合同4篇
- 老虎畫畫賀卡課程設(shè)計(jì)
- 二零二五版共享單車運(yùn)營管理服務(wù)合同4篇
- 2025年度個(gè)人別墅買賣合同范本8篇
- 安徽省合肥市包河區(qū)2023-2024學(xué)年九年級(jí)上學(xué)期期末化學(xué)試題
- 《酸堿罐區(qū)設(shè)計(jì)規(guī)范》編制說明
- PMC主管年終總結(jié)報(bào)告
- 售樓部保安管理培訓(xùn)
- 倉儲(chǔ)培訓(xùn)課件模板
- 2025屆高考地理一輪復(fù)習(xí)第七講水循環(huán)與洋流自主練含解析
- GB/T 44914-2024和田玉分級(jí)
- 2024年度企業(yè)入駐跨境電商孵化基地合作協(xié)議3篇
- 《形勢與政策》課程標(biāo)準(zhǔn)
- 2023年海南省公務(wù)員錄用考試《行測》真題卷及答案解析
- 橋梁監(jiān)測監(jiān)控實(shí)施方案
評(píng)論
0/150
提交評(píng)論