3 /// Null wrapper class for when opensync 0.22 is not available
7 Copyright (C) 2009-2010, 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.
27 /////////////////////////////////////////////////////////////////////////////
28 // OpenSync22 - public members
30 bool OpenSync22::symbols_loaded
= false;
32 OpenSync22::OpenSync22()
34 throw std::runtime_error("OpenSync 0.22 support was not compiled in.");
37 OpenSync22::~OpenSync22()
41 /////////////////////////////////////////////////////////////////////////////
42 // Null implementations
44 const char* OpenSync22::GetVersion() const
49 const char* OpenSync22::GetEngineName() const
54 void OpenSync22::GetPluginNames(string_list_type
&plugins
)
58 void OpenSync22::GetFormats(format_list_type
&formats
)
62 void OpenSync22::GetGroupNames(string_list_type
&groups
)
66 void OpenSync22::GetMembers(const std::string
&group_name
,
67 member_list_type
&members
)
71 void OpenSync22::AddGroup(const std::string
&group_name
)
75 void OpenSync22::DeleteGroup(const std::string
&group_name
)
79 Converter
& OpenSync22::GetConverter()
81 throw std::logic_error("Not supported on this system.");
84 long OpenSync22::AddMember(const std::string
&group_name
,
85 const std::string
&plugin_name
,
86 const std::string
&member_name
)
91 bool OpenSync22::IsConfigurable(const std::string
&group_name
,
97 std::string
OpenSync22::GetConfiguration(const std::string
&group_name
,
103 void OpenSync22::SetConfiguration(const std::string
&group_name
,
104 long member_id
, const std::string
&config_data
)
108 void OpenSync22::Discover(const std::string
&group_name
)
112 void OpenSync22::Sync(const std::string
&group_name
,
113 SyncStatus
&status_callback
)
117 //////////////////////////////////////////////////////////////////////////////
118 // Null Converter class
120 Converter22::Converter22(OpenSync::API
&api
)
125 bool Converter22::IsPluginSupported(const std::string
&plugin_name
,
126 std::string
*appname
) const
131 Converter::plugin_ptr
Converter22::CreateAndLoadPlugin(const Member
&member
)
133 return Converter::plugin_ptr();
136 std::string
Converter22::GetPluginName(const Config::Barry
&) const
138 throw std::logic_error("Not supported on this system.");
141 std::string
Converter22::GetPluginName(const Config::Evolution
&) const
143 throw std::logic_error("Not supported on this system.");
146 std::string
Converter22::GetPluginName(const Config::Unsupported
&) const
148 throw std::logic_error("Not supported on this system.");
151 bool Converter22::IsConfigured(const Config::Barry
&) const
156 bool Converter22::IsConfigured(const Config::Evolution
&) const
161 bool Converter22::IsConfigured(const Config::Unsupported
&) const
166 void Converter22::Load(Config::Barry
&config
, const Member
&member
)
168 throw std::logic_error("Not supported on this system.");
171 std::string
Converter22::GrabField(const std::string
&cfg
,
172 const std::string
&name
)
174 throw std::logic_error("Not supported on this system.");
177 void Converter22::Load(Config::Evolution
&config
, const Member
&member
)
179 throw std::logic_error("Not supported on this system.");
182 void Converter22::Load(Config::Unsupported
&config
, const Member
&member
)
184 throw std::logic_error("Not supported on this system.");
187 void Converter22::Save(const Config::Barry
&config
, const std::string
&group_name
)
189 throw std::logic_error("Not supported on this system.");
192 void Converter22::Save(const Config::Evolution
&config
, const std::string
&group_name
)
194 throw std::logic_error("Not supported on this system.");
197 void Converter22::Save(const Config::Unsupported
&config
, const std::string
&group_name
)
199 throw std::logic_error("Not supported on this system.");