|
From: deloptes <del...@ya...> - 2011-12-09 19:01:25
|
Chris Frey wrote:
> On Fri, Dec 09, 2011 at 10:30:43AM +0100, deloptes wrote:
>> 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 ...
>
> I'm curious how it functions with the synthesis calls in there. :-)
>
Here is 1 example with 1 call sysync::UI_Connect. This synthesis stuff is
still confusing to me :-). It looks like it will require more time to
understand it :-)
= osynctool --discover synth1 =
EKO: osync_bool get_sync_info(OSyncPluginEnv*, OSyncError**)
EKO: osync_bool get_sync_info(OSyncPluginEnv*, OSyncError**)
EKO: osync_bool get_sync_info(OSyncPluginEnv*, OSyncError**)
EKO: void* synthml_http_client_initialize(OSyncPlugin*, OSyncPluginInfo*,
OSyncError**)
EKO: bool OSynthML::SynthmlHttpClient::initialize(OSyncPlugin*,
OSyncPluginInfo*, OSyncError**)
EKO: virtual void OSynthML::SynthmlHttpClient::connect()connect to Synthesis
EKO: sysync::TSyError sysync::UI_Connect(sysync::SDK_InterfaceType*&,
void*&, bool&, sysync::cAppCharP, sysync::CVersion, sysync::uInt16)
EKO: void* synthml_http_client_initialize(OSyncPlugin*, OSyncPluginInfo*,
OSyncError**) OSyncObjTypeSink#contact
EKO: bool OSynthML::DataSink::initialize(OSyncPlugin*, OSyncPluginInfo*,
OSyncObjTypeSink*, OSyncError**) initializing: contact
EKO: bool OSynthML::DataSink::initialize(OSyncPlugin*, OSyncPluginInfo*,
OSyncObjTypeSink*, OSyncError**) DONE
EKO: void* synthml_http_client_initialize(OSyncPlugin*, OSyncPluginInfo*,
OSyncError**) DONE
EKO: osync_bool synthml_discover(SYNTHML_PLUGIN_TYPE, OSyncPluginInfo*,
void*, OSyncError**)Plugtype OBEX, CLIENT, SERVER: 1
EKO: osync_bool testSupport(OSyncObjTypeSink*, OSyncPluginConfig*,
std::string, OSyncError**)
EKO: osync_bool testSupport(OSyncObjTypeSink*, OSyncPluginConfig*,
std::string, OSyncError**) DevInf or similar asking the engine to provide
information
EKO: osync_bool testSupport(OSyncObjTypeSink*, OSyncPluginConfig*,
std::string, OSyncError**) foreach collection
EKO: osync_bool testSupport(OSyncObjTypeSink*, OSyncPluginConfig*,
std::string, OSyncError**)> configure ressource
EKO: osync_bool testSupport(OSyncObjTypeSink*, OSyncPluginConfig*,
std::string, OSyncError**) DONE
EKO: void synthml_http_client_finalize(void*) START
EKO: virtual void OSynthML::SynthmlHttpClient::disconnect() disconnect from
Synthesis
EKO: void synthml_http_client_finalize(void*) DONE
Discovered Objtypes:
contact
Format: vcard21
Format: vcard30
EKO: osync_bool get_sync_info(OSyncPluginEnv*, OSyncError**)
EKO: osync_bool get_sync_info(OSyncPluginEnv*, OSyncError**)
Discovered Objtypes:
contact
Format: file
>> EKO: get_sync_info:
the first 3 are for each plugin
and the last are perhaps for each format 1 call
thanks ... it's juts curiosity and no time to check the code :-)
>
>
>> 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.
>
> You can use any C++ code, even in C++ functions called from C. What you
> do _not_ want to have happen is for C++ exceptions to escape back into
> C land.
>
> So... in your C++ code:
>
> extern "C" {
> void cppfoo();
> }
>
> void cppfoo()
> {
> try {
> cout << "Hello world!" << endl;
>
> SomeClass obj;
> obj.ThisThrows();
> }
> catch(...) {
> cout << "Exception in C++ code!" << endl;
> }
> }
>
> And in your C code, which is blissfully unaware of exceptions:
>
> cppfoo();
>
> If you need examples of this, check out the Barry opensync plugins.
>
Thanks I think I understand better.
|