版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(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ǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 醫(yī)療咨詢與接待禮儀
- 2026年河南質(zhì)量工程職業(yè)學(xué)院單招職業(yè)技能筆試備考題庫帶答案解析
- 醫(yī)療人員禮儀培訓(xùn)內(nèi)容
- 2026年河北石油職業(yè)技術(shù)大學(xué)高職單招職業(yè)適應(yīng)性考試備考題庫有答案解析
- 醫(yī)院環(huán)境:整潔與溫馨并重
- 兒科疾病遠(yuǎn)程診療平臺(tái)建設(shè)
- 個(gè)性化藥物設(shè)計(jì)與藥物篩選
- 醫(yī)療大數(shù)據(jù)挖掘與智能決策
- 智能化醫(yī)療設(shè)備在心血管疾病中的應(yīng)用
- 2026年安徽黃梅戲藝術(shù)職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性測試備考試題有答案解析
- 魚塘測量施工方案
- 湖北省宜昌市秭歸縣2026屆物理八年級(jí)第一學(xué)期期末學(xué)業(yè)水平測試模擬試題含解析
- 重慶水利安全員c證考試題庫和及答案解析
- 2025秋期版國開電大本科《理工英語4》一平臺(tái)綜合測試形考任務(wù)在線形考試題及答案
- 2025 精神護(hù)理人員職業(yè)倦怠預(yù)防課件
- 簡易混凝土地坪施工方案
- 介紹數(shù)字孿生技術(shù)
- 水泵維修安全知識(shí)培訓(xùn)課件
- DBJT15-147-2018 建筑智能工程施工、檢測與驗(yàn)收規(guī)范
- 《智能制造技術(shù)基礎(chǔ)》課件
- 2025年征信考試題庫-征信系統(tǒng)架構(gòu)與安全試題
評論
0/150
提交評論