2013-04-29 09:23:34 +04:00
|
|
|
/*
|
|
|
|
grive: an GPL program to sync a local directory with Google Drive
|
|
|
|
Copyright (C) 2012 Wan Wai Ho
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation version 2
|
|
|
|
of the License.
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-05-17 16:54:04 +03:00
|
|
|
#include "base/Syncer.hh"
|
2013-04-29 09:23:34 +04:00
|
|
|
|
2015-05-17 16:54:04 +03:00
|
|
|
namespace gr {
|
2013-04-29 09:23:34 +04:00
|
|
|
|
2015-05-17 16:54:04 +03:00
|
|
|
class Feed;
|
2013-04-29 09:23:34 +04:00
|
|
|
|
|
|
|
namespace v2 {
|
|
|
|
|
2015-05-17 16:54:04 +03:00
|
|
|
class Syncer2: public Syncer
|
2013-04-29 09:23:34 +04:00
|
|
|
{
|
2015-05-17 16:54:04 +03:00
|
|
|
|
2013-04-29 09:23:34 +04:00
|
|
|
public :
|
2015-05-17 16:54:04 +03:00
|
|
|
|
|
|
|
Syncer2( http::Agent *http );
|
|
|
|
|
|
|
|
void DeleteRemote( Resource *res );
|
|
|
|
bool EditContent( Resource *res, bool new_rev );
|
|
|
|
bool Create( Resource *res );
|
|
|
|
|
|
|
|
std::auto_ptr<Feed> GetFolders();
|
|
|
|
std::auto_ptr<Feed> GetAll();
|
|
|
|
std::auto_ptr<Feed> GetChanges( long min_cstamp );
|
|
|
|
long GetChangeStamp( long min_cstamp );
|
2013-04-29 09:23:34 +04:00
|
|
|
|
|
|
|
private :
|
2015-05-17 16:54:04 +03:00
|
|
|
|
2015-05-17 20:10:03 +03:00
|
|
|
bool Upload( Resource *res );
|
|
|
|
|
2013-04-29 09:23:34 +04:00
|
|
|
} ;
|
|
|
|
|
|
|
|
} } // end of namespace gr::v2
|