package Ġcom . j ose ph . mail me . ui . recording _ service Ċ Ċ import Ġorg . green robot . event bus . EventBus Ċ import Ġorg . green robot . event bus . Subscribe Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġab Ġon Ġ 1 4 . 1 0 . 1 7 . Ċ Ġ*/ Ċ class ĠRecord ing Service _ Server Controller ( private Ġval Ġlistener : ĠController Listener ) Ġ{ ĊĠĠĠ Ġfun ĠonStart () Ġ{ ĊĠĠĠĠĠĠĠ ĠEvent Bus . getDefault (). register ( this ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Stop () Ġ{ ĊĠĠĠĠĠĠĠ ĠEvent Bus . getDefault (). unregister ( this ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Recording Started () Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( EventBus . getDefault (). has Subscriber For Event ( Event _ On Recording Started :: class . java )) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEvent Bus . getDefault (). post ( Event _ On Recording Started ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Recording Stopped () Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( EventBus . getDefault (). has Subscriber For Event ( Event _ On Recording Stopped :: class . java )) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEvent Bus . getDefault (). post ( Event _ On Recording Stopped ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Recording Progress ( duration : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( EventBus . getDefault (). has Subscriber For Event ( Event _ On Recording Progress :: class . java )) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEvent Bus . getDefault (). post ( Event _ On Recording Progress ( duration )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun Ġstop Recording ( event : ĠRecord ing Service _ Client Controller . Event _ Stop Recording ) Ġ{ ĊĠĠĠĠĠĠĠ Ġlistener . from Event Controller _ stop Recording () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġclass ĠEvent _ On Recording Started ĊĠĠĠ Ġclass ĠEvent _ On Recording Stopped ĊĠĠĠ Ġclass ĠEvent _ On Recording Progress ( val Ġduration : ĠString ) ĊĊĠĠĠ Ġinterface ĠController Listener Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġfrom Event Controller _ stop Recording () ĊĠĠĠ Ġ} Ċ }