Hello!
I'm currrently thinking about synchronizing files and/or complete
directory hierarchies.
Is there any kind of support for OMA-TS-DS DataObjFile in libsynthesis?
Section 14.4 mentiones 'plugin module “FILEOBJ”', but I am not sure
whether that is enabled and/or included in the open source code? "nm -C
libsynthesis.a | grep SDK_fileobj" says its not included.
The DataObjFile format describes XML tags to represent file name,
attributes and content. If this was a MIME dir based format, I knew how
to write a profile, but with XML, we would need something akin to
mimedirprofile.cpp/h, right?
Regarding DataObjFile, is the directory name is meant to be included in
the <name> tag? I suspect that SyncML's <SourceParent> in combination
with DataObjFolder is meant to be used. libsynthesis has only
rudimentary (no?) support for the parent ID, hasn't it? I remember that
it is part of the DB API, without any use in the engine at the moment.
When discussing the strengths of libsynthesis, it was mentioned that
data can be extracted directly from WBXML. I understand that part and
now wonder about the next step: can large items also be streamed
directly to and from the underlying database?
I'm thinking of a field list which contains one field that represents
binary file content. When synchronizing a large file, it would be nice
if the content of that field could be read and written from disk instead
of buffering the whole item in memory.
The only part in the DB API that looks feasible for that is
Read/WriteBlob and there is indeed an entry in the SDK pdf about this:
There are two extensions to this syntax:
• BLOBs: For binary large object blocks the field contains only a
reference to the BLOB
identifier which will be read and written with ReadBlob/WriteBlob.
Syntax: aa;BLOBID=xyz where <xyz> is the name of the BLOB.
But that is about the syntax in ReadNextItem; how can the same be done
with ReadNextItemAsField? How about storing a new or updated item in the
DB - would the engine then ask the DB layer to create a blob once it
starts parsing an item which contains such a field? There is a field
type "blob", but I'm not sure how that works.
Ah, found something in the XML config pdf:
"mode"
"p": This flag means that the field should not be literally mapped,
but inserted as a pa-
rameter. BLOBs are always inserted as parameters (even without the
"p" flag), but for
long strigs it might make sense as well. For ODBC, "p" means using
the ODBC parame-
ter mechanism; for plugin datastores, it causes the BLOBID-mechanism
to be used (see
SDK docs).
But I searched the SDK doc without finding a description of that
mechanism and how it relates to fields.
I thought I'd better ask here first. Of course, there's always the
source code ;-)
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis