xtaran / amora-test

Automatically exported from code.google.com/p/amora
0 stars 0 forks source link

Server modularization #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
My proposal it to change the current server source code distribution. The
bluetooth.c will deal only bluetooth related code (the unique that will
include bluz-related stuff), x11.c will handle X11 stuff (of course that
can be split in submodules) and so on. In the main.c will remains only the
server setup and the basic initialization logic. Most of the task will be
move code from one side to other side and create abstraction layers.

Benefits:
- Easier to create utests.
- Possible pluggable backends (x11, camera, etc) and frontends (bluetooth,
wi-fi, etc) in the near future.
- Portability.
- Much more.

Original issue reported on code.google.com by tmpsan...@gmail.com on 24 Jan 2008 at 3:37

GoogleCodeExporter commented 9 years ago
Thiago

I think that move code around to make it better to manage and also improve
organization is an easy task and quick to be done.

The current server structure is:

 - bluecode.c: does service description structure creation + socket I/O (mostly POSIX
+ ANSI C code). I think we can change the file name to make it clearer what is 
the
purpose of this file (e.g. amora_io.c?).

 - linux.c: has the BlueZ calls. If we port amora server to other O.S. (e.g. FreeBSD,
MacOSX) this is where each UNIX have a different API for bluetooth.

 - x11_event.c: all the X11 related code.

 - protocol.c: client vs. server protocol processing + macros

 - imscreen.c: screen capture and image handling (rescale, rotation) code. I agree
that only the 'screen capture' is a bit related with x11 code.

 - loop.c: the uLoop fd callback code

 - log.c: logging function

I think since you are planning to change this source code file organization, 
could
you extend further the details of what are the changes required to make the 
server
code more modular?

Best regards

Adenilson

Original comment by cavalcan...@gmail.com on 24 Jan 2008 at 12:59

GoogleCodeExporter commented 9 years ago
Work started on branches/amora-modular revision 471.

Original comment by tmpsan...@gmail.com on 19 Feb 2008 at 2:47

GoogleCodeExporter commented 9 years ago
Considering the recent changes on r567, the new issue for discussion was moved 
to
issue 68.

Original comment by cavalcan...@gmail.com on 14 Aug 2008 at 8:40