Initial structure of the server plugin

To handle both bluetooth and USB connectors, USBConnection and BTConnection
classes would be created. The USB connector would require a USB kernel module
to create a /dev/ttyGS1 (possibly a gadget driver) that can handle the communication
with the PC host. The PC host can be an application that talks SyncML and will
act as a SyncML client, which this plugin will act as a OBEX server as
well as SyncML server.

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
Dummy implementation of virtual methods

Implemented the USB socket opening and dummy methods for the virtual
methods in the base class. Next step is to implement the Sync
functionality

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
Implemented SyncML agent config, new session on incoming USB connect and
the complete structure

Connected SyncMLServer with the USBConnection and implemented the agent
configuration, listening and connected the necessary signals and slots.
Added method in SyncMLConfig to return the SyncML configuration files

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
Core implementation of server plugin over USB complete

The core flow of the server plugin for sync over USB is complete. Need
to test the flow

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
Created server plugin xml and modified the .pro file accordingly

Created the server plugin xml for USB connectivity and modified the .pro
file to copy the to the target dir. Also fixed issues with USBConnection
inherinting from QObject. Apparently, QObject has to be the first class
to inherit from, rather than OBEXConnection. Tested the server plugin
with syncml-ds-tool (from OpenSync project) over USB and could see that
sync invocation happens. But the syncml-ds-tool exits after sometime out
because of which the server plugin complains of link failure. This needs
to be debugged further. Also, there is an issue with QSocketNotifier
that the 'activated' signal gets triggered quite frequently. This
probably needs to be replaced with glib socket observer functionality

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
Merge remote-tracking branch 'upstream/master'
This patch makes sync work with syncml-ds-tool

Fixed SyncML initialization to create a single session on sync
initiation from the syncml-ds-tool. Tested that the sync succeeds from
the output of the contact on the PC. The QDeviceInfo class has a problem
that the QDeviceInfo::imeiCount() crashes. Hardcoded a dummy IMEI number
for the time being. There is still a problem that
QSocketNotifier::activated gets triggered at every instance. Probably
glib IO functions have to be used. Next steps: mFd gets closed after one
sync session. Also, sync results need to be handled properly

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
Used glib monitoring of USB fd

Using QSocketNotifier is causing multiple notifications. Also fine
handling of the connects/disconnects does not seem to be possible (or
atlest, I need to know how to do it). Added a DEFINES flag to switch
between QSocketNotifier and glib. Whenever I am able to figure out
correct usage of QSocketNotifier (or whenever QSocketNotifier impl is
fixed), I will remove usage of glib. With this patch, sync works fine.
After every sync session, the fd gets closed (because of the way SyncML
stack is implemented). Is this ok?

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
Added generate results and sync finished functionality.

Implemented generateResults and syncFinished functionality to generate
the sync results and to signal proper sync finished state. Also added
the initial code to handle the sync over Bluetooth or USB.

Reverted back to Qt5SystemInfo after update of development environment

After moving to Qt5SystemInfo, QDeviceInfo::imeiCount(int) does not
crash anymore.

Signed-off-by: Sateesh Kavuri <sateesh@mobilitas.co>
[packaging] Update packaging to include syncml server