Re: [Easyb2k-devel] Application Structure
Status: Pre-Alpha
Brought to you by:
wyrm
From: Thomas R. <tre...@ya...> - 2007-10-30 23:02:33
|
Hi Marcos,=0AI can see how the daemon is launched as soon as a device is pl= ugged in, via HAL.=0ABut how can the daemon start a certain glue software (= and maybe the associated VoIP app)? How can one determine how many VoIP app= s are installed? And what is a VoIP ping?=0AYour pt. 3b looks more practica= l than 3a but glue software might be part of the VoIP app and started with = it, not by the daemon, couldn't it?=0AAs long as we do not have nailed down= the top-level design and the interfaces between the components (at least t= o some point) I do not think checking in libyealink makes much sense! It su= re can serve as one of the sources for the device plugin but probably does = not resemble the future device plugin. (BTW, I would also like the plugin t= o be renamed a bit.)=0ARegards,=0A-Thomas=0A=0A=0A----- Original Mail ----= =0AVon: Marcos <ma...@un...>=0AAn: eas...@li...urceforg= e.net=0AGesendet: Dienstag, den 30. Oktober 2007, 21:38:21 Uhr=0ABetreff: R= e: [Easyb2k-devel] Application Structure=0A=0AHi!=0A=0AFirst of all, I beli= ve the yealink devices can be abstracted to a=0A generic yealink devices, w= ith=0Acapabilities. Thomas did a great job on his libYealink about that. = =0A=0AOur design is by now it extremely complicated. Skypemate is simple=0A= because it just work with one=0Adevice at the same time.=0A=0AIf you plug = two devices, it will just pick one at random and ignore the=0A other.=0AThe= refore you can not have two devices on the same machine. I don't=0A like th= at.=0ANevertheless you can have more glues (SkypeMate,YahooMate, etc ) on t= he=0A same machine. The user=0Ajust load the specific WHATEVERmate, and whi= chever gets loaded first=0A "owns" the device. =0AIn such a scenario, there= is always one device and one glue, so the=0A choice is trivial. I don't=0A= like that either.=0A=0ANow how are going to manage multiple devices and glu= es without a=0A configuration file ?=0AI can not see any simpler design tha= n:=0A=0A1) The user plugs a device. =0A2) The daemon is automatically launc= hed.=0A3a) If there is just one device and one VoIP program, the specific g= lue=0A is loaded with the device=0Aas a configuration.=0A( a VoIP ping shou= ld be implemented by the glues....)=0A3b) The daemon gets the device's seri= al number and launches/loads the=0A right glue (informing which=0Adevice th= e glue should use) according to the configuration file.=0A=0ANotes:=0A- If = the glue talks to the device thought the deamon, it will talk=0A through a = generic device, with=0Acapabilities.=0A- If the glue talks directly ( and I= can not see a reason for that, the=0A daemon closes )=0A=0ATo make things = simple for the user, a configuration program could be=0A implemented and po= p up=0Awhenever the second device gets plugged. We could have two special= =0A devices called "GLUE DISABLE"=0Aand "ANY DEVICE". Any newly installed g= lue will be by default connected=0A to the "any device"=0Adevice.=0A=0A=0AI= still have not seen/understood anything simpler.... Daniel, your=0A sugges= tion does not handle=0Amultiple glues per device.=0A=0ABy the way, I implem= ented a program called lsYealink, which list the=0A yealink devices. It is = in the=0ASVN. (sf.net/easyb2k) =0AThomas, please upload libyealink to the s= vn, so I can add my code to=0A it.=0A=0A=0AMarcos=0A=0A=0A--- Thomas Reitma= yr <tre...@ya...> schrieb:=0A=0A> Hi,=0A> after reading through the = various emails I missed before, I have a=0A few=0A> comments / suggestions= / thoughts:=0A> =0A> * Using D-BUS instead of UNIX sockets sounds like a g= ood idea. Using=0A> David's drawing the structure would look like=0A> =0A>= VoIP application=0A> ^=0A> | (any protocol, depending = on VoIP application)=0A> v=0A> Glue Software (most likely a separ= ate component, like gnomemeeting=0A> connector)=0A> ^=0A> = | (D-BUS)=0A> v=0A> Our Daemon=0A> =0A> * Also I love the idea = of using HAL, it provides enough information=0A for=0A> the daemon to load= the appropriate low-level device plugin (i.e.=0A> libyealink) and notifie= s the daemon about new or removed devices.=0A The retrieval of the serial= =0A> number (or any other distinctive value) could then be implemented in= =0A the driver plugin.=0A> =0A> Now a question:=0A> You discussed that ther= e could be a "single device" mode (i.e. grab=0A the one device available)= =0A> and a "multi-device" mode, which requires a command-line argument to= =0A the daemon or, if missing,=0A> asks for for it.=0A> Now what I am not 1= 00% understanding in this setup is:=0A> 1. Who starts the daemon, i.e. who = is responsible for supplying the=0A command-line argument?=0A> 2. How can a= user select the right device without diving into the=0A guts of some start= up file?=0A> =0A> What I have in mind would be a daemon which consists of t= he following=0A components:=0A> =0A> a. The daemon core which is only respo= nsible for =0A> - providing the D-BUS object any glue initially connects= to=0A> - tracking available devices via HAL=0A> - dynamically loadin= g the device plugin depending on HAL's device=0A properties=0A> - spawni= ng a daemon device manager (see b.) for a specific device=0A by request of = glue software=0A> - providing a list of available devices by request of = glue=0A software=0A> =0A> b. The daemon device manager, which is instantiat= ed for each device=0A when it is requested by glue=0A> software and which= =0A> - provides the main D-BUS interface for the phone functionality on= =0A one side=0A> - talks to the device plugin on the other side=0A> -= could also implement DTMF or Bell 202 signaling if required by=0A phone (i= mplementation=0A> detail)=0A> - also (via D-BUS) provides information ab= out configuration=0A parameters and methods for=0A> setting/getting these p= arameters (Note: The parameters depend on the=0A selected phone model.)=0A>= =0A> The device plugin(s) could have the following tasks:=0A> - provide a = defined interface to the daemon, including advertising=0A some low-level ca= pabilities=0A> if that makes sense for easier implementation of the daemon = device=0A manager=0A> - provide a unique ID for a specific phone to be pass= ed on all the=0A way up to the glue software=0A> to later identify the phon= e=0A> - implement the low-level USB calls to the device.=0A> =0A> With this= infrastructure the glue software would register with the=0A daemon core an= d if it does=0A> not know about a previously selected specific device, ask = the daemon=0A core for the first=0A> available device. It could also prompt= the user to select one of the=0A available devices. If the=0A> glue softwa= re has found an already selected device ID in its=0A configuration, it coul= d ask for=0A> that specific device only.=0A> >From this point on it would o= nly talk to the newly created daemon=0A device manager about=0A> configurat= ion parameters and then about the general phone operation.=0A> =0A> Did I m= iss KISS?=0A> Is this too complicated, is there a simpler structure allowin= g=0A similar convenience like=0A> SkypeMate?=0A> =0A> Regards,=0A> -Thomas= =0A> =0A> =0A> =0A> Machen Sie Yahoo! zu Ihrer Startseite. Los geht'= s: =0A> http://de.yahoo.com/set=0A> =0A>=0A -------------------------------= ------------------------------------------=0A> This SF.net email is sponsor= ed by: Splunk Inc.=0A> Still grepping through log files to find problems? = Stop.=0A> Now Search log events and configuration files using AJAX and a=0A= browser.=0A> Download your FREE copy of Splunk now >> http://get.splunk.co= m/=0A> _______________________________________________=0A> Easyb2k-devel ma= iling list=0A> Eas...@li...=0A> https://lists.source= forge.net/lists/listinfo/easyb2k-devel=0A> =0A=0A=0A-----------------------= --------------------------------------------------=0AThis SF.net email is s= ponsored by: Splunk Inc.=0AStill grepping through log files to find problem= s? Stop.=0ANow Search log events and configuration files using AJAX and a = browser.=0ADownload your FREE copy of Splunk now >> http://get.splunk.com/= =0A_______________________________________________=0AEasyb2k-devel mailing = list=0AE...@li...=0Ahttps://lists.sourceforge.net/= lists/listinfo/easyb2k-devel=0A=0A=0A=0A=0A=0A Heute schon einen Blick= in die Zukunft von E-Mails wagen? Versuchen Sie=B4s mit dem neuen Yahoo! M= ail. www.yahoo.de/mail |