3 /// Null wrapper class for with opensync 0.4x is not available
7 Copyright (C) 2009-2013, Net Direct Inc. (http://www.netdirect.ca/)
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License in the COPYING file at the
19 root directory of this project for more details.
28 static void ThrowNotSupported()
30 throw std::logic_error("Not supported on this system.");
33 /////////////////////////////////////////////////////////////////////////////
34 // OpenSync40 - public members
36 OpenSync40::OpenSync40()
38 throw std::runtime_error(_C("OpenSync 0.4x support was not compiled in."));
41 OpenSync40::~OpenSync40()
45 /////////////////////////////////////////////////////////////////////////////
46 // Null implementations
48 const char* OpenSync40::GetVersion() const
53 const char* OpenSync40::GetEngineName() const
58 void OpenSync40::GetPluginNames(string_list_type
&plugins
)
62 void OpenSync40::GetFormats(format_list_type
&formats
)
66 void OpenSync40::GetGroupNames(string_list_type
&groups
)
70 void OpenSync40::GetMembers(const std::string
&group_name
,
71 member_list_type
&members
)
75 void OpenSync40::AddGroup(const std::string
&group_name
)
79 void OpenSync40::DeleteGroup(const std::string
&group_name
)
83 Converter
& OpenSync40::GetConverter()
85 throw std::logic_error(_C("Not supported on this system."));
88 long OpenSync40::AddMember(const std::string
&group_name
,
89 const std::string
&plugin_name
,
90 const std::string
&member_name
)
95 void OpenSync40::DeleteMember(const std::string
&group_name
, long member_id
)
99 void OpenSync40::DeleteMember(const std::string
&group_name
,
100 const std::string
&plugin_name
)
104 bool OpenSync40::IsConfigurable(const std::string
&group_name
,
110 std::string
OpenSync40::GetConfiguration(const std::string
&group_name
,
116 void OpenSync40::SetConfiguration(const std::string
&group_name
,
117 long member_id
, const std::string
&config_data
)
121 void OpenSync40::Discover(const std::string
&group_name
)
125 void OpenSync40::Sync(const std::string
&group_name
,
126 SyncStatus
&status_callback
,
127 Config::pst_type sync_types
)
131 //////////////////////////////////////////////////////////////////////////////
134 Converter40::Converter40(OpenSync::OpenSync40
&api
)
139 bool Converter40::IsPluginSupported(const std::string
&plugin_name
,
140 std::string
*appname
) const
145 Converter::plugin_ptr
Converter40::CreateAndLoadPlugin(const Member
&member
)
147 return Converter::plugin_ptr();
150 std::string
Converter40::GetPluginName(const Config::Barry
&) const
152 throw std::logic_error(_C("Not supported on this system."));
155 std::string
Converter40::GetPluginName(const Config::Evolution
&) const
157 throw std::logic_error(_C("Not supported on this system."));
160 std::string
Converter40::GetPluginName(const Config::Evolution3
&) const
162 throw std::logic_error(_C("Not supported on this system."));
165 std::string
Converter40::GetPluginName(const Config::Google
&) const
167 throw std::logic_error(_C("Not supported on this system."));
170 std::string
Converter40::GetPluginName(const Config::KDEPim
&) const
172 throw std::logic_error(_C("Not supported on this system."));
175 std::string
Converter40::GetPluginName(const Config::Unsupported
&) const
177 throw std::logic_error(_C("Not supported on this system."));
180 bool Converter40::IsConfigured(const Config::Barry
&) const
185 bool Converter40::IsConfigured(const Config::Evolution
&) const
190 bool Converter40::IsConfigured(const Config::Evolution3
&) const
195 bool Converter40::IsConfigured(const Config::Google
&) const
200 bool Converter40::IsConfigured(const Config::KDEPim
&) const
205 bool Converter40::IsConfigured(const Config::Unsupported
&) const
210 Config::pst_type
Converter40::GetSupportedSyncTypes(const Config::Barry
&) const
215 Config::pst_type
Converter40::GetSupportedSyncTypes(const Config::Evolution
&) const
220 Config::pst_type
Converter40::GetSupportedSyncTypes(const Config::Evolution3
&) const
225 Config::pst_type
Converter40::GetSupportedSyncTypes(const Config::Google
&) const
230 Config::pst_type
Converter40::GetSupportedSyncTypes(const Config::KDEPim
&) const
235 Config::pst_type
Converter40::GetSupportedSyncTypes(const Config::Unsupported
&) const
240 void Converter40::Load(Config::Barry
&config
, const Member
&member
)
245 void Converter40::Load(Config::Evolution
&config
, const Member
&member
)
250 void Converter40::Load(Config::Evolution3
&config
, const Member
&member
)
255 void Converter40::Load(Config::Google
&config
, const Member
&member
)
260 void Converter40::Load(Config::KDEPim
&config
, const Member
&member
)
265 void Converter40::Load(Config::Unsupported
&config
, const Member
&member
)
270 void Converter40::Save(const Config::Barry
&config
, const std::string
&group_name
)
275 void Converter40::Save(const Config::Evolution
&config
, const std::string
&group_name
)
280 void Converter40::Save(const Config::Evolution3
&config
, const std::string
&group_name
)
285 void Converter40::Save(const Config::Google
&config
, const std::string
&group_name
)
290 void Converter40::Save(const Config::KDEPim
&config
, const std::string
&group_name
)
295 void Converter40::Save(const Config::Unsupported
&config
, const std::string
&group_name
)