/*! \page plugin-guide Writing plugins for Synchronization Framework 

\tableofcontents

\section kinds-of-plugins Kinds of plugins that Buteo supports
-# <b> Client plugins </b>
Plugins which act as clients to services running outside the machine (device/PC/
tablet) domain. These plugins are loaded whenever there is a need for starting
sync and are unloaded once done. More than one client plugin can be loaded at any 
point of time, provided that they deal with different kinds of storages 
(contacts, calendar, notes etc.) 
-# <b> Server plugins </b>
Server plugins are alive forever and act as server for clients that would like to
connect to the server. A typical example of a server plugin is a SyncML server
plugin that acts as a server for an external client
-# <b> Storage plugins </b>
A storage plugin enables a generic API for accessing the data from the device
databases, like Contacts, File system, Calendar etc. These plugins can then be
used across multiple protocols like Dropbox, Google services, Caldav etc.

\section create-plugin Creating a plugin

See the DummyClient and DummyServer classes in unittests/dummyplugins for
plugin examples.

\section libsyncml Device sync with libsyncml
libsyncml is a desktop based sync engine that support sync using SyncML
protocol
URL: https://libsyncml.opensync.org/
It comes with a cmdline tool syncml-ds-tool to perform sync. Following
instructions help in performing the sync over bluetooth and USB

Buteo works with libsyncml over USB as well as bluetooth. These instructions
are w.r.t the sailfish OS, but as and when more Linux based OS's are supported,
these instructions will be extended

\subsection usb-sync Sync over USB

-# Connect the Sailfish based device to your PC over USB.
-# Select the MTP mode when asked for a USB mode selection
-# From the PC (Ubuntu or a version supporting libsyncml), install libsyncml-utils
(in debian, 'sudo apt-get install libsyncml-utils)
-# Run the following sync command for USB:
\code
     sudo syncml-ds-tool -u 1 --identifier "PC Suite" --sync text/x-vcard Contacts 
\endcode
    Note: The command has to run as 'sudo', else you will have to add the USB
    device into your udev list
-# The above command should fetch all the contacts in the Sailfish phone to your
PC and dump the output to the screen. For more options of syncml-ds-tool, look at
its help or the libsyncml website

\subsection bluetooth-sync Sync over bluetooth

-# Pair your bluetooth enabled PC/laptop with Sailfish based device. Also enable
the bluetooth options of "connect automatically" and "trust" 
-# Find out the bluetooth address of the sailfish based device by running the
hcitool.
\code
    hcitool scan 
\endcode
-# Run the following sync command:
\code
    syncml-ds-tool -b <bluetooth address> 26 --identifier "PC Suite" --sync text/x-vcard Contacts 
\endcode
   26 is the channel number of the SyncML bluetooth profile
   Replace <bluetooth address> with the bluetooth address of your sailfish
   device (something like B4:EE:D4:F6:19:E7)
-# The above command should fetch all the contacts in the Sailfish device
to your PC and dump the output to the screen.

\subsection sailfish-N9-contacts Synchronization of Contacts between Sailfish and N9

-# In N9, go to Settings -> Sync & Backup -> Sync -> Add new sync target (+ below)
-# Choose the Sailfish device in the list of bluetooth devices
-# Start sync

*/
