49class SYNCMLSERVERSHARED_EXPORT
SyncMLServer :
public Buteo::ServerPlugin
55 const Buteo::Profile profile,
56 Buteo::PluginCbInterface *cbInterface);
62 virtual bool uninit ();
64 virtual void abortSync (Sync::SyncStatus status = Sync::SYNC_ABORTED);
66 virtual bool cleanUp ();
68 virtual Buteo::SyncResults getSyncResults ()
const;
70 virtual bool startListen ();
72 virtual void stopListen ();
74 virtual void suspend ();
76 virtual void resume ();
80 void syncFinished (Sync::SyncStatus);
82 void sessionInProgress (Sync::ConnectivityType);
87 virtual void connectivityStateChanged (Sync::ConnectivityType type,
bool state);
91 void handleUSBConnected (
int fd);
93 void handleBTConnected (
int fd, QString btAddr);
95 void handleSyncFinished (DataSync::SyncState state);
97 void handleStateChanged (DataSync::SyncState state);
99 void handleStorageAccquired (QString storageType);
101 void handleItemProcessed (DataSync::ModificationType modificationType,
102 DataSync::ModifiedDatabase modifiedDb,
104 QString dbType,
int committedItems);
107 bool initSyncAgent ();
109 void closeSyncAgent ();
111 void closeUSBTransport ();
113 void closeBTTransport ();
115 DataSync::SyncAgentConfig *initSyncAgentConfig ();
117 void closeSyncAgentConfig ();
119 bool initStorageProvider ();
121 bool createUSBTransport ();
123 bool createBTTransport ();
125 bool startNewSession (QString address);
127 void generateResults (
bool success);
129 QMap<QString, QString> mProperties;
131 DataSync::SyncAgent* mAgent;
133 DataSync::SyncAgentConfig* mConfig;
139 DataSync::Transport* mTransport;
141 Buteo::SyncResults mResults;
145 qint32 mCommittedItems;
150 Sync::ConnectivityType mConnectionType;
155 bool mIsSessionInProgress;
Buteo::ServerPlugin * createServerPlugin(const QString &pluginName, const Buteo::Profile &profile, Buteo::PluginCbInterface *cbInterface) override
Creates SyncML server plugin.