HarmattanSyncApplications
debian/tmp/usr/include/syncmlcommon/SyncMLStorageProvider.h
1/*
2 * This file is part of buteo-sync-plugins package
3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 *
6 * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * version 2.1 as published by the Free Software Foundation.
11 *
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
24#ifndef SYNCMLSTORAGEPROVIDER_H
25#define SYNCMLSTORAGEPROVIDER_H
26
27#include <buteosyncml5/StorageProvider.h>
28
29namespace Buteo {
30 class Profile;
31 class SyncPluginBase;
32 class PluginCbInterface;
33 class SyncMLStorageProviderTest;
34}
35
43class SyncMLStorageProvider : public DataSync::StorageProvider
44{
45public:
46
51
56
65 bool init( Buteo::Profile* aProfile,
66 Buteo::SyncPluginBase* aPlugin,
67 Buteo::PluginCbInterface* aCbInterface,
68 bool aRequestStorages );
69
74 bool uninit();
75
79 virtual bool getStorageContentFormatInfo( const QString& aURI,
80 DataSync::StorageContentFormatInfo& aInfo );
81
85 virtual DataSync::StoragePlugin* acquireStorageByURI( const QString& aURI );
86
90 virtual DataSync::StoragePlugin* acquireStorageByMIME( const QString& aMIME );
91
95 virtual void releaseStorage( DataSync::StoragePlugin* aStorage );
96
101 void setRemoteName(const QString& aRemoteName);
102
107 void setUUID(const QString& aRemoteUUID);
108
109private:
110
111 QString getPreferredURINames( const QString &aURI );
112
113 DataSync::StoragePlugin* acquireStorage( const Buteo::Profile* aProfile );
114
115 Buteo::Profile* iProfile;
116 Buteo::SyncPluginBase* iPlugin;
117 Buteo::PluginCbInterface* iCbInterface;
118 bool iRequestStorages;
119 QString iRemoteName;
120 QString iUUID;
121
122 friend class Buteo::SyncMLStorageProviderTest;
123
124};
125
126#endif // SYNCMLSTORAGEPROVIDER_H
Module that provides storages to libmeegosyncml in syncml client/server plugins.
Definition debian/tmp/usr/include/syncmlcommon/SyncMLStorageProvider.h:44
bool uninit()
Uninitializes the storage provider.
void setUUID(const QString &aRemoteUUID)
set a UUID for the remote party that initiated sync
virtual ~SyncMLStorageProvider()
Destructor.
bool init(Buteo::Profile *aProfile, Buteo::SyncPluginBase *aPlugin, Buteo::PluginCbInterface *aCbInterface, bool aRequestStorages)
Initializes the storage provider.
virtual DataSync::StoragePlugin * acquireStorageByURI(const QString &aURI)
SyncMLStorageProvider()
Constructor.
virtual void releaseStorage(DataSync::StoragePlugin *aStorage)
virtual DataSync::StoragePlugin * acquireStorageByMIME(const QString &aMIME)
virtual bool getStorageContentFormatInfo(const QString &aURI, DataSync::StorageContentFormatInfo &aInfo)
void setRemoteName(const QString &aRemoteName)
set the name of the remote party that initiated sync