Bumped copyright dates for 2013
[barry.git] / desktop / src / null-os40.cc
blob69471a5df9ad6a400c31cfc6e0aa89a6ed64bab2
1 ///
2 /// \file null-os40.cc
3 /// Null wrapper class for with opensync 0.4x is not available
4 ///
6 /*
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.
22 #include "os40.h"
23 #include "osconv40.h"
24 #include "i18n.h"
26 namespace OpenSync {
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
50 return 0;
53 const char* OpenSync40::GetEngineName() const
55 return "0.40";
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)
92 return 0;
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,
105 long member_id)
107 return false;
110 std::string OpenSync40::GetConfiguration(const std::string &group_name,
111 long member_id)
113 return "";
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 //////////////////////////////////////////////////////////////////////////////
132 // Null Converter40
134 Converter40::Converter40(OpenSync::OpenSync40 &api)
135 : m_api(api)
139 bool Converter40::IsPluginSupported(const std::string &plugin_name,
140 std::string *appname) const
142 return false;
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
182 return false;
185 bool Converter40::IsConfigured(const Config::Evolution &) const
187 return false;
190 bool Converter40::IsConfigured(const Config::Evolution3 &) const
192 return false;
195 bool Converter40::IsConfigured(const Config::Google &) const
197 return false;
200 bool Converter40::IsConfigured(const Config::KDEPim &) const
202 return false;
205 bool Converter40::IsConfigured(const Config::Unsupported &) const
207 return false;
210 Config::pst_type Converter40::GetSupportedSyncTypes(const Config::Barry &) const
212 return PST_NONE;
215 Config::pst_type Converter40::GetSupportedSyncTypes(const Config::Evolution &) const
217 return PST_NONE;
220 Config::pst_type Converter40::GetSupportedSyncTypes(const Config::Evolution3 &) const
222 return PST_NONE;
225 Config::pst_type Converter40::GetSupportedSyncTypes(const Config::Google &) const
227 return PST_NONE;
230 Config::pst_type Converter40::GetSupportedSyncTypes(const Config::KDEPim &) const
232 return PST_NONE;
235 Config::pst_type Converter40::GetSupportedSyncTypes(const Config::Unsupported &) const
237 return PST_NONE;
240 void Converter40::Load(Config::Barry &config, const Member &member)
242 ThrowNotSupported();
245 void Converter40::Load(Config::Evolution &config, const Member &member)
247 ThrowNotSupported();
250 void Converter40::Load(Config::Evolution3 &config, const Member &member)
252 ThrowNotSupported();
255 void Converter40::Load(Config::Google &config, const Member &member)
257 ThrowNotSupported();
260 void Converter40::Load(Config::KDEPim &config, const Member &member)
262 ThrowNotSupported();
265 void Converter40::Load(Config::Unsupported &config, const Member &member)
267 ThrowNotSupported();
270 void Converter40::Save(const Config::Barry &config, const std::string &group_name)
272 ThrowNotSupported();
275 void Converter40::Save(const Config::Evolution &config, const std::string &group_name)
277 ThrowNotSupported();
280 void Converter40::Save(const Config::Evolution3 &config, const std::string &group_name)
282 ThrowNotSupported();
285 void Converter40::Save(const Config::Google &config, const std::string &group_name)
287 ThrowNotSupported();
290 void Converter40::Save(const Config::KDEPim &config, const std::string &group_name)
292 ThrowNotSupported();
295 void Converter40::Save(const Config::Unsupported &config, const std::string &group_name)
297 ThrowNotSupported();