|
From: deloptes <del...@ya...> - 2011-12-09 09:31:19
|
Chris Frey wrote:
> I don't think I'd worry about getting the classes correct just yet.
> I'd try writing just a skeleton framework, with maybe printf() statements
> following the logic, just as a simple proof of concept. Once we have
> such a framework, I can certainly look at it, and provide suggestions
> on a class hierarchy.
OK, so here is something interesting to start with.
I've got the framework to compile and link. Also the basic opensync related
stuff. At this point I am not calling any synthesis functions as it needs
to be configured first ...
The lines prefixed with EKO: are of interest. I'll probably better use
__PRETTY_FUNCTION__ macro for this. Anyway, I was wondering why it is
calling "get_sync_info" that many times in the discover function ... is it
coming from the threads that are started?
Note that "EKO: connect to Synthesis" is coming from the
httpClientSink->connect() which is the mainSink and inheriting the
synthesis UI class.
"EKO: initializing: contact" is comming from the DataSink class that is
inheriting the DB API class
= osynctool --listplugins =
EKO: get_sync_info:
Available plugins:
synthml-obex-client
synthml-http-server
synthml-http-client
akonadi-sync
file-sync
evo2-sync
= osynctool --discover synth1 =
EKO: get_sync_info:
EKO: get_sync_info:
EKO: get_sync_info:
EKO: synthml_http_client_initialize
EKO: httpClientSink->initialize() DONE
EKO: connect to Synthesis
EKO: OSyncObjTypeSink#contact
EKO: initializing: contact
EKO: synthml_discover: 1
EKO: DevInf or similar asking the engine to provide information
EKO: foreach collection
EKO: configure ressource
EKO: synthml_http_client_finalize:
EKO: disconnect from Synthesis
EKO: synthml_http_client_finalize: DONE
Discovered Objtypes:
contact
Format: vcard21
Format: vcard30
EKO: get_sync_info:
EKO: get_sync_info:
Discovered Objtypes:
contact
Format: file
And something C/C++ related - where can I read about it, or can you answer
briefly here. there is this extern C {} block and inside I can use
std::cout << ...;
How is this all handled by the compiler and/or processor so that it works
from C. I would say it is the compiler that is doing the magic ... but I'm
too curious to know what actually happens. In the book it says briefly, it
is providing access to C++ functions from C.
I was reading this
http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html but got
confused in the middle.
regards
|