syncevolution/src/CmdlineSyncClient.h
Patrick Ohly d8283ba873 sync source handling: implemented per-source property filtering, Cmdline uses it
Selecting active sources during a sync or status check was done with a
combination of setting a sync mode via a source config filter and
setting a list of active sources. Now the SyncConfig supports a source
filter which is applied to all sources and source filters for each
source. The latter override the former.

This is powerful enough to start syncs with full control over which
sources are active in which mode, as described in the new D-Bus API.
As part of this patch, the command line semantic is implemented
entirely using a combination of different source filters.
2009-10-07 18:10:00 +02:00

57 lines
1.9 KiB
C++

/*
* Copyright (C) 2009 Intel Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) version 3.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef INCL_CMDLINESYNCCLIENT
#define INCL_CMDLINESYNCCLIENT
#include <syncevo/SyncContext.h>
#include <syncevo/declarations.h>
SE_BEGIN_CXX
/**
* a command line sync client for the purpose of
* supporting a mechanism to save and retrieve password
* in keyring.
*/
class CmdlineSyncClient : public SyncContext {
public:
CmdlineSyncClient(const string &server,
bool doLogging = false,
bool useKeyring = false);
using SyncConfig::savePassword;
/**
* These 2 functions are from ConfigUserInterface and implement it
* to use keyring to retrieve and save password in the keyring.
*/
virtual string askPassword(const string &passwordName, const string &descr, const ConfigPasswordKey &key);
virtual bool savePassword(const string &passwordName, const string &password, const ConfigPasswordKey &key);
void setKeyring(bool keyring) { m_keyring = keyring; }
bool getKeyring() const { return m_keyring; }
private:
/** a bool flag used to indicate whether to use keyring to store password */
bool m_keyring;
};
SE_END_CXX
#endif // INCL_CMDLINESYNCCLIENT