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=Z¢Ù~q§XYCÉ³ZZSËÕqÌ)ÚCÎÐÚ(ÛCÏÑÛ(ÌÜ=ÜXÏ ÝCÝ(¸=KCK(o Þ ÞRqjq¾CoPßCÖ(QPàØ¿n×(¸ ãQC¥ b(ZØid²tS(e Y®ÀCg(ÁhZ N(mZCCt,RZ\ Ú(R Û(s(PÜ=Ú=SCÝ(Û K(m Þ¨(õ ©o  R0Rãqm(¥¥fo ¸= K=¹ Ú(CZ,ÛYX.CmZé}=ãZ¥fèPN K(Ú=n ÛY ue(äRqÀCÚ(Á Û=eëÜ(êØÝ ìíT(i î~=ÀCï«ðÁ w=eäR§vZiX ånæ ç   y((èCé Á i ý«Ú=Û(Ü(Ý(K(Þ o R 8  K(Ú(Û m  Z
É³¡ËÍòÌÎíY®ÏÑZÌÏóC¸¾~o QCRPNSÓC ô²mvïqñ ðYwnZ §Xã õ¥f§Ø t¯i §ØXöqÀn÷qÁ øeù~tvNCu«w Ú(i Û==Ü(ÀCÝ(Á K(~e Þ¸x(T(oy î~= Xï«ð=jy w=xX§vy Z Xy m(µ t û §vw ¡(ò uPý
Zj=qi É³=ËÍÌÃ Îí®ÏÑÁ\ÌÄCÏ m«Å úC T(û ü¦§qwSu,RqRq[([(]X](^(^(_(_=`(`(afa~b(b(dfdfee g(g(hShSii 7  Ö(x(×(y ã ¥~Xx(y y  Xyÿ k(R(l u«mqýPñ qYC[(Z]=ã ^(¥C_(NS`(V(a~ bXjdfCe g(èh¯hi Á k(e lmu¢ýCtSmþ 7,  Ú(i(Û(ånÜ(æ Ý~ç x(y  Xy(y(è=é Á x(y  Xyñ  u«w=§vZ=þXtv ¦u¢ýP  mqñ  YXZ ã ¥CN Ö(×Øm ©( ÙCYCZ\Ú(Û(ÜXÝ(K(Þ o R Ö(×(ã ¥ mvñ YXZ ã ¥CYCZCt R  w¡(ò ®YXYnZ\Z=(ýC N=m X)¬Z  m=mqñ ñj Y®¾CYXZ QPZ ã ¿C¥.=Qn sCb(i Ndf=ne À~§qg(Áh(i(e«(m(tsµ u ¿Cm Ú=QnÛ(b(Ü(dfÝ(e K=g=Þ hSmqi(ñoP°YZ ã ± ¥Cg(NhSi N Ö(=×nmqñm ©X ÙCYXYXZqZ=¾nþCQt)m  )m( ñ mqYCñ Z YXã Z ¥nã NC¥f iZn(t À®fÁ ï¢e,tvðnu,Z w jX¡(¸ ò RvYXÉ³ËÍZ\Ìó(Îí¾CÏÑÌQ Ï Û(êØÜ=ìÝ(R K(Ö(Þf×(ã  ¥¦¡(ò   u«~ýqqxXÚ(y Û( Ü(XÝ=yCK(tvÞ u,wS¸=Ro Ö(Rq×(Ú(ãÛ(Ü(¥cÝ t ÚmñN Y®Z =ã mq¥ ñ t  iCYXåfZæ\vç Ú( Û(®Ü( Ý yXm(ñ ènYXé Z Á ã mX¥cñ t Y®R Zi(ã åØ¥ æ
 " ! ðCZ\(CN(CZCtÐC­=ýPº=Ì)ÎÐ»CÏÑ¼ ÌÏ&$j %È#«nT(o ü.R(uR  ·(,'*pC) K=L=LCs r=m,s + tX§qu¢wSwq-n.YXuqZCýIþCÉ³t Ë ç m R Ú( Û(y(Ü(=Ýcè=t é i(Á åCmqæ ñ ç YX Z ã  ¥ y(j (8è¯ é ' Á s²  ¡( ò Xu«Zvý«ý ¸Ç Cy jZqi É³(ËÕÃÌ)ÎÐ®ÏÑÁÌÄC&Ï % Å T(T(1ü ü®0 YXm ZR®þCx(ty=md(nzS{( R|~ }«j /± . É³º(ËÍ»=ÌÎí¼=ÏÑ½ ÌÏCÓ= Ô~jï« ð=m w=6 §Y¯Z  i (Ã ~e³ÁP9nÄnÂXÅ bXj df*e ØmXo R¸Á\ÄCÅ j(li  ( Àn' Á §(ýP g(h¯iy= 23 m ¤(¥CYXZ=þCt\N ¸=¹ Z
=

Ã
i
®

»(¼ 45f = m 6 Y¯
¡¢
£¤¥¦
7 É³ËÕÌÎíÏÑÌÏ m«úCû §=ý«[(]X^(_(`(afb(dfe g(hSi§ ¨ª©&«­¬­®­¯±° ² ³y´¶µ[7 (T(j=](üi ^=(_(Ã ®`(a~Á\Änb=Ådfj e T(g(ü h(iqj=i =Ã ®Á\Ä®Å  8·¸·¸·º¹¼»¸½¿¾ÁÀ
·¸·¸·º¹¼»¸½¿¾ÁÀÃÂ¼ÄÆÅ
7 8¦T.üu®ý i ¦Ã  ÁnÄ Å (9;:¦M u=RqÉ³Ë
$
Ç
a
È
¶
É
Ì
Ê
v
Ë
Ï
Í
Ì)T(ÎÐü¦ÏÑu«Ì&Ïý.%ÈÉ³ ËÍÌT(Îíü ÏÑÌ<Ï % jP*· ') L(s m + §qwP - Ð ÑRÒbÓÔÖÕM×ØJRLONÙPÚÎ¼Ë/QRÎ SmTÛSÜcÛdmeRY7º(þX»(t\¼N ¸=¸=¹o R®Z8x(É³ËÍy=Ìd(ÎíÏÑzSÌ{(<Ï % |~}« T( üCYX yZ=þX2t\3N m¸=¤X¹ ¥CýPqYXTZ É³ËÍÌÎíg^ÏÑhÝÌÏ Tßm«ÞÜúCà û §(ý«[(]X^(_(`(afb(dfe gXhSiqj=i ü¦ ' u«ý.§XZ=É³ËÍþXÌÎít ÏÑ¸ ÌR~<Ï % x(y(m¢úCd(zSû {X§q|~wPT(}ü¦ u«ý iy=( 2Ã 3®mÁ\¤(ÄC¥Å ÃÆ ~y Á\PÄCSXÅ T(o üCR YX.âZSqæ [(`(](´*^(ã _(k `=0a~äP`(b(´ dfmXe g(nhS R®iq*jx=áy<<hook>><<hook>><<hook>><<hook>>d(zS{=|~}  y= ¤(¥.u,õ*å¢ð(æ(õØì,õ=§çè  õé ¸ XZ á Æ y PSX êØì j!*êCmX Z88 é m
 R i (Ã ®Á\ÄCÅ  T(üCYXZëìîíðïñò óô*õ,öx÷øù ñïñfúvû÷üx(yfy(e N.d=zSe {(æ |~} tõXZ yj(j¸ ýR(þÚ(­Û=oÜ(RÝ(áKXÆÞfyP êØìqj wIÇ ÿ 
C k= lPSYCXZv¸() j Ú(mqñÛ=YCÜ(ÝfZ\ÚX Û(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XyZ ¤(¥CYXZ f
RTS

StateC

SystemA

Await

ev2/
act2
State1

Await

RXS

OQP

ev5/act5

State3
State2
ev4/act4

RXS

UWV

VisualSetting
2/toVisual
TimeSetting

3/toTimeqxqqx oTXqXxXq qØÚÙÜÛ<<hook>>ÝÜÞ¿ßÜà

PhoneSystem

UWV

CPButton<<interface>>
CCStateCCSTM

å%æ¿çWè*é êìëîí%ï%ð*ñ#ò

PButtonSTM<<interface>>
PButtonState<<hook>>MButtonSTM<<interface>>
MButtonState<<hook>>áÜâÜã¿ä

PhoneSTM<<hook>>PhoneáÜâÜãÜä

<<hook>> ButtonSTM<<interface>>
PhoneCCState

PhoneCCSTM<<interface>>
PButtonAction<<interface>>
MButtonAction

å%æ¿ç+è*é%êìë í%ïð*ñ#ò

RPhoneSTM<<interface>>
RPhoneState<<hook>>SPhoneSTM<<interface>>
SPhoneState<<hook>>StateC

SystemB

StateD

MenuSystem<<interface>>
SPhoneAction

SystemA

UWV<<hook>>óóóÿûXþü<<hook>>DisplaySystemóXóóûTþQü
óóóõôöø÷ùúTûÇ!"f$ª #&%'1('©)§¨+*-,(.

UWV

ev7/act7

State6

StateD

ev1/act1<<hook>><<interface>>
RPhoneAction<<hook>>T(Xü8tu«Rý ái =Æ Ãyx®ã ®Á\ÄCz Å oå } _Ç õSSXjS° õ²± jSg(ChSi êS ìº(Û(»(Ü(¼Ý²¸=t o R  Ú=Û(¬Ü(Ýfmq ñ YXj Ú(Z Û(=Ü=sÝ(K(j nÞ §qm«¡R vZÆ Ú T(SîfCï«ð¯t R° q.ðc± g(ì,NhSÖ(iX×Xo ãRq¥Ú(Û(k Ü= Ý(t\K(õXÞfZ  Cw® RjSÖ(C×Ø m©(ÙnYXZ¸ëì_^a)`b8`c k(dfle YXZÑRÒbÓÔÖÕM×ØJRLONÙPÚQRSmTÛSÜcÛdmeRY. Æ ÚCÛ=ÜCÝ t ÿ   ÚCÛ=ÜCÝ. C j ÚÛCÜXÝKCÞ m¡^(_(åX`=Z a~fb(df' e g=§(wShSRviqj) á Æ k(y l PYC¯XZ,éc«tvgu«wSZRv [(á ] Æ ìîí g^ÕfhÝÖ T Ä$ÏÞÖ÷«à Ð ÑfÒfÓLÔ ¯ÃÄdle
yd(m(zS{=o Rq|~V(} jx= y(y ª d(mzSÚX{(Û(|cÜ(}Ý( K=ÞC NyPN C.YZu R® áx(yÆ Tg(üh¯i uqý k(i l =u«Ã ýPc Á¢k(Ä®l Å u« ý«' [(§v](w¯^=[C_(]C`(^=a~_CbX`Cdfa²e b=g(d.h¯i ey j x=yXdz({C|f}P n yqN ý*þih Z jlk²Ù nm m mt¯> §q8uw¯Rq«ýq qmq) ñ YXmqñZ ãYX¥®Z ãN ¥nN mqñCmqñ u«w=Y§ZZ=j þ
6 YS
ev1/act1<<hook>>State5

State4

SystemB
SystemBÝÜÞ¿ßÜà

ButtonSystem

SystemA
ev3/act3

Await

ev6/
act6

<<CC>>:|q}qzT{SoundSetting
1/toSound
MainMenu«h t RZ¢Æ qá y(Ú(NÆ Û(¯y Ü(j® Ý=xK(åqyCÞcÚdXtHÛzv´«{Cj ¶®|²ïvï§}P·®m;Z °²ØÇ*±1 ÿ áy(yfN?Æ e´«y(µN´³²'Øµ m'CïPýð~mýþZþ ­CZ=þXt ¸ R á Æ y j x(y(d(zS{=|~} n y= ý*þ­ëXìîë¹Z¢ ¸%ºW»b¼¾½¿»>½?ÀÁiÂ«ÃÄ?ÅÆ;ÇlÈÉ?Ê-ËÙòÖúÍÌÎÏc)® ÁÄCÏÅ ÷«" Ð ! T=ÑfðüCÒfýqYXÓLRqZÔ [(vc ]=T(Õf^(ü¦Ö _Xu«`(ý«af[(]=b(^(d¦_(e `(gXachSi(b(j=dfi e (g=Ãhiqji (Ã ®Á\ÄCÅ x G× m 6 YS

SystemB

SystemA~qpxzX{á

SystemA

State7

Ringing

in_mic/InMic
recv/RecvVoiceÇL¡£¢¤¥1§¦¨©«ªb¬?­¥Ç%(*)+"!#"%$%$%&%&%' 'Ç-,/.01324 567 89;:3<=>=?1A@B
1.
ÿ
ev6/act6

ev1/act1

Talking<<CC>>
ON/
Connect

OK: noEvent -> ShowMenu
ON: noEvent -> Callnum: noEvent -> InputNum

State5

State4

CLEAR/DeleteNum
num/InputNum

rqzXsQ{ tvuxwTy<<CC>>
recv/
Connected

oqpxzX{

Calling<<CC>>
recv/
Ringing

Await

ev5/act5

State2

ev2/act2
State1

State3

ON/Call

InputNumOFF/BackAwait

ev1/act1
ev1/act1

qTQvq

OK: noEvent -> noEvent
ON: Call -> noEventnum: InputNum -> noEvent

SystemB

State7

ÇLYZ24567 81\[ ]9;:3<=>=?1A@B 


.
C
å
ÿ

10

/

32

10

54

76
&8

9

<

;:

>=

@?A

<<hook>>óXóóüTýXþ

f m YSk xCB 6

ButtonSystem<<interface>>
ButtonState

ButtonSTM
trans():voidput():void

CPButtonrun(): void°±©ªIG«I²¬ ³´

III

I<<interface>>
ButtonAction
do_it():voidawait_trans():ButtonState:<<hook>> CPButton<<hook>>PhoneButtonSTM
trans():voidrun(){
while(true){try{
synchronized(this){wait();}
try{
GoAwaitContract.
getInstance().require();}catch(AwaitException e){
CCSTM.getInstance().put(new IEvent(IEvent.GO_MAIN));
CCSTM.getInstance().
trans();}}catch(...){
...
}
}
}

InputNumStateB
await_trans():ButtonState:trans() {try {GoAwaitContract.
getInstance().require() ;Switch(...) { ... }} catch(AwaitException e) {CCSTM.getInstance().put(new IEvent(IEvent.GO_MAIN)) ;CCSTM.getInstance().
trans() ;}}AwaitActB
do_it():void

InputNumStateB() {Await_trans() {try {GoAwaitContract.
getInstance().require() ;} catch(AwaitException e) {CCSTM.getInstance().put(new IEvent(IEvent.GO_MAIN)) ;CCSTM.getInstance().
trans() ;}return new AwaitStateB();}
call_trans() {try {GoAwaitContract.
getInstance().require() ;} catch(AwaitException e) {CCSTM.getInstance().put(new IEvent(IEvent.GO_MAIN)) ;CCSTM.getInstance().
trans() ;}return new CallStateB();
}
:
}

wv

6

zy

{

~}

^5/3

3

<<interface>>
RPhoneState¯I®
©IªI«I¬

PhoneCCSTM

SPhoneSTM<<interface>> <<hook>><<interface>>
PhoneCCAction
PhoneCCState<<interface>>
SPhoneStateG¡G¢¤£¥¦G§¨<<hook>>MenuSystem<<interface>>
RPhoneActionG¡G¢¤£¥¦G§¨<<hook>><<interface>>
SPhoneAction<<hook>>·<<hook>><<hook>>DisplaySystem<<hook>> ²¸¤¹Gº»¼½¾À¿ÂÁ-Ã&ÄzÅ&ÆÇÈ7ÉÊ7Ë$ÌÍ&ÎpÏ(Î&ÐzÑ-Ò@ÓeÔPÕ
<<hook>>Ö×ÙØWÚÜÛ$ÝßÞ`ÛeÞ`àâá(ãåäPæçéèPê
System<<hook>>Mode1ëìíî<<hook>>ïðñò<<hook>>óôöõ÷]øù]úûüýþÿ<<hook>><<hook>>Mode2ïðñò<<hook>>óôöõ÷]øù]úIûüýþÿNx<<hook>><<hook>>IIIG
Ic¤G
©IªI«I¬GG¡¢¤£¥¦G§¨

pointcut atAwaitContract1() :execution(void PhoneButtonSTM.trans(..)) ;:) mqñ YXZ ã ¥f i (ÀCÁ e tvu,w Cè|(PqM¦u,ýP)g( hSi=«Ñfpi ÒfKC(Ó«LCÃ Ô ®rCc Ás ÄCtCÕfÅ Öu¯ w¯8XCT( ü¦u«u«RqýS[C]8(^®T(_ü¦`Cu«a²ý bCi d.(Ã e[(ã®](¥¦Á\^(ÄC _(Åi `((x a~À®b(Á dfme«6tve gSYSuhSwi(o   ö(jnþX tPöN m ¸¹  ZSmqqñ) YvmZñõ ãYX¥Z ã ¸ ¥ CoZ Cw  jSm(Cñ  YXqZ Sã X¥f t i° (²Àn± Ág(hSe«ivt\Y¸ (Z þ_(N=t `(¸Â C8=a~T(YXb(ü¦ZCdftÐu«e Cýg=­ØihSiq(ì ðnjÃ ®Z) ÁPÄCmqÅñ YX ' Z §(w k( l¬  u«ý¢j [(]((^s
psr tvuxwytzw TßÞÜà
8(T(ü8u«ý«[(](^=_(`(a~bXdfe g(hSi(j=i (Ã  Á\ÄCÅR i =ÀCÁ e"ä j(ñCj (¡  ¹ YCþt ¸ 9:(M¦u R É³ËÍÌÎÐÏÒÌ &Ï %. T(ü¦u,ýPqT(ü¦u«ý~É³ËÍÌÎíÏÑÌ<Ï %o RqÉ³8ËÍÌu ÎíR ÏÑi Ì(Ï mÀnÁ  e,x(tvyu,w ¡(XòyXtvu«ýPu,wT(U ¦m õx(Zy qT(Xü y<<hook>>RPhoneSTM<<hook>>public aspect ConfigAspect {Çi =>=f9j&k;<&'§¦l(*lªnmpoqâú ÌÎÏciÏ÷«Ð< ì_^a`b`r?^s(tC= ÄÅÆ;ÇlÈÉ?Ê-ËÙòÖÍ

<<hook>><<hook>>­I®
© ªI«I¬
I<<hook>>Cv<<hook>>III) mqÒñ Ï YXZ $ãR ¥CNSR¢Ñ Ì j Xn  RÁ X m ÒÏ ')& R
mqñ u,w=§vZ ÑÌ j ® C R Á ( êØÑÏ ì 'R & R =m(Ññ Ï u$R w=§vZ ËãZ ¥fã ¥  io((i ÀC(ÀCÁ Á e,tve u,w ¡(~ò m u«ýPM8¡(u«ò ýPu«ý.k(l  u¢mqý ñi YÀCÁ e  m YS

|<<interface>>
MButtonState

PhoneSystemÇL =>=1NMPO&QSRUTWVUXZYY[]\ >  ^VUXZYY[]\V_X`YY[]\ `Ya]Yb ^VUXZYY[c\ edYfg[]\?   UTWVUXZYY[c\ >  3V_X`YY[c\+V_X`YY[c\ ZYacYb +V_X`YY[c\ edYfg[]\  "ä  IJ"ä  xC
 h 6Pu<<interface>>

CCState<<hook>>DEGFIHJGK}<<interface>>
PButtonAction<<hook>> MButtonAction<<hook>>void around() : atAwaitContract1() {try {GoAwaitContract.getInstance().require() ;proceed() ;} catch(AwaitException e) {CCSTM.getInstance().put(new IEvent(IEvent.GO_MAIN)) ;CCSTM.getInstance().trans() ;}}:<<hook>>G¡¢¤£¥¦G§¨

MButtonSTM<<hook>> <<interface>>

Phone

CC

<<interface>>
PButtonStateµ¶©IªI«I¬

CCSTM<<interface>>
CCActionG¡¢¤£¥¦G§¨<<hook>>III
Ic
©Iª«I¬G¡G¢¤£¥¦G§¨

do_it() {try {GoAwaitContract.
getInstance().require() ;} catch(AwaitException e) {CCSTM.getInstance().put(new IEvent(IEvent.GO_MAIN)) ;CCSTM.getInstance().
trans() ;}}<<hook>>PButtonSTM<<hook>>º<<hook>>ûGøù]úIû

û Güø

<<hook>>½¾À¿ÂÁ w

Ö× ØWÚÜÛ$ÝßÞ`ÛeÞ`à "!$#&%"'&%&()+*-,.0/$12/3  æ;< "=2>?$@BACED&FHG&IED ê$J2K
4 57698&: 2"
LMON2>$P  GQ&A"R2STD ê

U

V7W


ØWÚÜÛ$ÝßÞ`ÛeÞ`àX1

Ö×acb GQ
è=2>?$@Yæ$Z2<$["\^]E1"_`D ê(&)k*H,&./1lB1nmOo25&péæCØWÚ
N2>> /Eu95vxwzy|{~}{~{~eá P ærÖ[q r h2s$t
2
=
$
>



æ ØWÚÜÛ$ÝßÞ`ÛeÞ`àâá N2>
d l&1
P ærÖ[q &O ij ()+*-,.O/éá
&$^2&"¡£¢¤~¢¥ ¦§¢¨©ª¬«T­®
¯"°±²2³&A" Ö× ØWÚÜÛ$ÝßÞ`ÛeÞ`à "! efghi2j ()+*,2.0/1´y|{~}{µ{~1^/E34O576"8B:5æ2¶ =2>TA^·^D^¸F áH¹º Ö×w¤ã¬»½¼¾¿ê$y|{~}{~{ F "!
r h m"oO5p"À2Á  æOÂ&3EÃ"1 s$t áHÄ MBÅ ¶1 AC&D ê$y|{}~{{~Æ"ÇcÈ s&É"ÊË 1
 æ"Â&3&Ã á s$t Ö×ÍÌ2Î2!$y|{}~{{~ÔDÓEÕ×Ö á+è D êÆ"Ï t áÐÑb-Ò
r h7Ø æ¡y|{}{~{Â&3EÃ á s$t Ö×ÍÌr
Î æ"!Hy|{~}{~{ r hÙÚ 1"ÛÜÂc3nÃ st 1 Ó^ÕÝÖ áPè D ê$y|{}{~{1&o25B3¡*ßÞ7mu"àâá ãWä á(ã¬»½(» æçéèPê
ØWÚÜÛ$ÝßÞ`ÛeÞ`à
æ$åBæBé< ××y|{}~{{~ç1B/^3E4576O87: A
"!èè æ$é è D"êë á NEì æ"í Å¸EF"ÆA^· ×!ê de2fEg2h&i2j
Û$Ý-ÞZÛeÞ`à>áÖ×ÙØWÚÜÛ$ÝßÞ`ÛeÞ`à "! efghij()k*-,.O/12/34"5698&: 2()+*-,.0/$1"l&1=2>?@

æ;<$[&¶

Y&Æ"î

FG&I
<

D ê

bðï

ButtonSystemñ~òóô<<hook>> Receiver<<hook>><<hook>>!" 

RecvCCSTM<<interface>>
RRecvState<<hook>><<interface>>
RRecvAction<<interface>>
CCAction

#$



Phone

<<hook>>%$<<hook>><<hook>>WatchSystemAlarmÎÐÑÒÓdÔjÕÖ×ÎÏÏ ÎdØÙÕÚìíîï
ß;è;àéêjáãâë äåæjç  

 
<<hook>><<interface>>
SAlarmState<<hook>><<interface>>
SAlarmAction<<hook>>úÑ ñ ó)Ôû<<interface>>
SPhoneAction<<hook>>DisplaySystem

ß;è;àéêjáãâë äåæjç

SAlarmSTM<<hook>><<interface>> <<hook>><<interface>>
AlarmCCAction
AlarmCCState<<interface>>
SPhoneState

StopWatchSystemü þÿìíîï

AlarmCCSTM<<interface>>
RPhoneAction<<hook>><<hook>>& ÷')(ûú*<<hook>><<hook>><<hook>><<interface>>
RPhoneState

SPhoneSTM<<interface>> <<hook>><<interface>>
PhoneCCAction
PhoneCCState<<hook>><<hook>>RPhoneSTM

PhoneCCSTM<<interface>>
AButtonStateÛÜÝÞ<<hook>><<hook>><<interface>>

CCStateAlarmSystem<<hook>><<hook>><<hook>>õ<<interface>>
SButtonAction<<hook>> AButtonAction<<hook>> TRecvAction

PhoneSystem 

<<hook>>ßèàéê;áðâë äåæç

AButtonSTM<<hook>> <<interface>><<hook>><<interface>>
TRecvState<<hook>><<hook>>÷ø Õùìíîï<<interface>>
SButtonState<<interface>><<interface>> <<hook>><<interface>>
RecvCCAction
RecvCCStateòö÷ øùûúü~ýþ òõ ò ü <<hook>>

CCSTM 

TRecvSTM

SButtonSTMÎÐÑÒÓ)ÔjÕÖ×ÎÏÏ Î[ØÙÕÚìíîïßèàéêjáãâë äåæç 

ß;è;àéêjáãâë äåæjç<<hook>><<hook>><<hook>><<hook>><<hook>>õñ Øjòóôõò;öìíîïüý<<hook>> WButton<<hook>>RRecvSTMòö÷ ø ùûúü~ýþÿòõ ò ü ÛÜÝÞ

ÌÍÎ

#$


ReceiverSystem<<hook>><<hook>>DisplaySystemº,+

SÇÈ!ÉÊØWÚÜÛ$ÝßÞ`ÛeÞ`àX1<<hook>><<hook>>ËUÌ&Í&ÎpÏ(ÎÐÑpÒ+Ó-Ô(Õ<<hook>>º,+-/.10203 4)05_Ï(ÎÐÑpÒ+Ó-Ô(ÕJK[qrstef)g[hjikl
recv: Ringing -> noEventm)noAp?A@<<CC>>
recv/
Ringing6789 =>Await<<CC>>
on/
Connect

BCADE

Ringing?)@)FG

Talkingrecv/RecvVoice<<CC>>:L)MAN)OQPR)SUTVUWX)Y[Z]\;^_)`]abcdWNAO

recv: RecvVoice -> Ringingº,+)+{.|0203 4)05$Ï~}&Ò^ÐéËpº 000¡ 22$©ðªX«T­® ¯"°±^²&³7A& Ö!× ØWÚÛUÝ-Þ`ÛeÞZàÝ!
+ i&j (&) *,^.2/E1^/&3&4576O87:éæ2¶ =B>BA&·TDT¸nF á9¹&ºwÖF $!Eo×*&,98E!
×PêB iEj (2)X*H,E.0/
M  1 @ á&Z
D ()X*-,.
/3p 
&O á i2j è/ AC&D ê &O ij ()+*,.O/O! F Ö[¡ Ãu2m"oO5Eprá9!£¢ F Ö[OÂ¥¤"o¥¦§nm"oO5p á¨ ë è D ê©ªTmOo5&p F ÖÔ[^O!  m$o05&p!
o *E,H87m"oO5Ep!&/3$pBm"oO5Ep M, á¨ë è D ê()+*H,.O/$1 ¡ ÃuOO!Eo *E,H8M 
1 ¬u) ¤­®¥¦H3Em°¯ uPæ²± = è D³¡ Ãu0$o * T, H87m"oO5Ep"ÀEÁ Ø æ µ¶· «¸¹ 1 ÓÕ Ö á Ö-!&/ 23$p&m"oO5Tp"ÀÁÓÕ Ö á+è D ê  Ö×æ1
º»¼
&O ij ()+*-,.O/$12/34"57698&é: á(ã×¾» ½^æçéèPê
ØWÚÜÛ$ÝßÞ`ÛeÞ`àwæÍå&æ^3< × &0 iEj ()k*-,E.O/12/E3
4"57698B: A "!èè æ3
é è D"êë á N2ì æ í Å¸EF"ÆAT· ×3ê & ÖP× ØWÚÜÛ$ÝßÞ`ÛeÞ`à $lc1À¿Á§7uÂ É 1/34O5n698&:$1  æ;E<$[2¶ =2>2?$@Y&Æ"î < FGI bðï D ê

Ãi j
&O « /23$p´ ÆC&D êÄÆÅÈÇÉ±^²&³7A

O! e&f&g&h^i&j (^) *Í,&.2/1B/&3^45 6
8&:3æ×èè /$oÊ&6k*áË Ö &ï0!!ØWÚÜÛ$Ý-Þ`ÛeÞZà á 

æ$Z^<$[

GQ

èè+1;á G&ITD BA !,¬u)¤­®¥¦Í3Em°¯ u$1£¬
u95B4$o *|1!;á GnIED³ ´ ¶ CED ê PnI" !£Á§ #$&% Ø æ$Ï t ÆE(
C ' ×$Ì&ÎB!£¬&u&)£¤­® ¦Í3Bm ¯uá-Ï t > æ*)+ I !
r h ,- ræ*./¥¬u)¤­®¥¦93m¯$u áÁ§# $%2> æ*0éè ³ ´ ÆCED ê<<CC>>
off/BackAwaitef)gdhjikl=2>?$@Yè < ¸&F ae^f&g&h 1 r t ê&ëcA  °&3 Æ  Ö « B
b-! efghi2j ()+*,.O/3æ Y $æ é3è DÔêë&
Æ ³ ´ AC&D&FG&I bðï D ê&1 F 
Ö [2"! e
2
(
+
)
*

,
O
.

/
2
1

/

3
O
4
n
5
9
6
&
8
:
3

æ


 Y /fg2hij
C  bðï D êo ÊB6+* áË Ö Eï D2¸EF9Æu:v< wxyz

HAIJK DE

Ö×

Ö×Pê

recv: noEvent -> RecvVoice?)@6789;:<6=> 789Ö×Pêef)g[hjikl

12

±²2³

D æ C × Ö7689&M j:; á"<5×<<3×=!EDF M / ¿HG§oráH]JI ' ×KMLNO BC !
PQR 1ST"
Ð U(IMVO!MWX!YZ(IV!M[\] t I
VO!S^_`aIVOM! b= Zc(IV0M! XdefgIVO! ±hij IVOM! k=lmJIV æ*nporqsB3< ×rÖt^èPê
á435

u

>?A@BCV(vxw± hij ! }~e2! c2!a e2f
Ð|2! Dg2hÉ
r t ()k*H,E.0/12/oÊn6k* : Âë QM
Q  ´ PQME
r t
A M
!  êMy]Úy M! êá ä$Ûr {~¡} ¢§¤! £¥¦¨§ª©©{¬} «ª ¨¡{ ­ª®¦ ¯©±°½{~¡} ³²´©¶! µß{~} ê·êá ¸ä$ØÂêM¹4°º º °§¬! ¢êM»¼«½ ¦½ ¾§¬{ !ûN
y ê¿¡{ «½º"À
! °Á¨¾-Ny êM¢Â®£¨ÁZÚ®Á½¥! Ã*ÄÆÅÇ³ÈÉÊrËÍÌÌÎÄÆÏÎÉÅÑÐÓÒ ÄÆÔMÄÆÉ¨ÌÅ4Õ×ÖÙØÓÄÆÚÛÅËÜÒ ÄÞÝÓÜ½ßÀÄàÆÌáÝâÏÎÇÄÆÉ¨ÌÎÄã äÙÕÖÌårËÎÏÄ 3! Û¼¾¨¾§½ ¦®ÁZÚ×æ2¡{ «µ¡{ ç½*! êMè M! ê¸·M! yèè·êá éä ¢Â°± ° M! £Û¦¦¨§ª©©²°±
 °­ªêëÁ¨­¡} ®º ©ìÂµç{} êM·êá ·r
ä íî&ï&ð! /T
o Ê76 * : Ân(2) *H,&.2/2/&3&4O5 6
8&:$12à ñò ræ3
é è DÔ²³ ó  PQPQ RMôõ
Q$²³ ôõQMö÷øùM& !Mê$ã!Mêá yärz{æ2;

á ãäéúrû ü !M£¥¦¦¨­ª©©ýéýéý¤­½êëº «ª­ª®¯© !*µç{}êM·ê