2012-05-01 19:24:40 +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
|
|
|
|
|
2016-09-28 01:19:13 +03:00
|
|
|
#include "util/Types.hh"
|
2012-05-01 19:24:40 +04:00
|
|
|
#include "util/DateTime.hh"
|
2012-05-19 21:44:46 +04:00
|
|
|
#include "util/FileSystem.hh"
|
2012-05-01 19:24:40 +04:00
|
|
|
|
|
|
|
#include <iosfwd>
|
2012-05-13 21:07:23 +04:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2012-05-01 19:24:40 +04:00
|
|
|
|
|
|
|
namespace gr {
|
|
|
|
|
2012-05-10 20:06:05 +04:00
|
|
|
/*! \brief corresponds to an "entry" in the resource feed
|
|
|
|
|
|
|
|
This class is decodes an entry in the resource feed. It will stored the properties like
|
2012-05-20 10:57:25 +04:00
|
|
|
title, filename and ETag etc in member variables. Normally entries are created by
|
|
|
|
parsing the resource feed
|
2012-05-10 20:06:05 +04:00
|
|
|
*/
|
2012-05-09 19:09:19 +04:00
|
|
|
class Entry
|
2012-05-01 19:24:40 +04:00
|
|
|
{
|
|
|
|
public :
|
2012-05-20 10:57:25 +04:00
|
|
|
Entry( ) ;
|
2012-05-31 19:37:47 +04:00
|
|
|
|
2012-05-01 19:24:40 +04:00
|
|
|
std::string Title() const ;
|
|
|
|
std::string Filename() const ;
|
2015-05-16 12:35:41 +03:00
|
|
|
bool IsDir() const ;
|
2012-05-20 10:57:25 +04:00
|
|
|
std::string MD5() const ;
|
|
|
|
DateTime MTime() const ;
|
2016-09-28 01:19:13 +03:00
|
|
|
u64_t Size() const ;
|
2012-05-01 19:24:40 +04:00
|
|
|
|
2012-06-10 12:18:21 +04:00
|
|
|
std::string Name() const ;
|
|
|
|
|
2012-05-06 18:27:52 +04:00
|
|
|
std::string ResourceID() const ;
|
|
|
|
std::string ETag() const ;
|
|
|
|
|
2012-05-09 19:52:06 +04:00
|
|
|
std::string SelfHref() const ;
|
|
|
|
std::string ParentHref() const ;
|
2012-05-13 21:07:23 +04:00
|
|
|
std::string ContentSrc() const ;
|
2015-05-16 12:35:41 +03:00
|
|
|
bool IsEditable() const ;
|
2012-06-06 19:35:29 +04:00
|
|
|
long ChangeStamp() const ;
|
2012-06-10 17:03:32 +04:00
|
|
|
|
|
|
|
bool IsChange() const ;
|
2012-06-06 19:35:29 +04:00
|
|
|
bool IsRemoved() const ;
|
2012-05-01 19:24:40 +04:00
|
|
|
|
2012-05-12 08:27:35 +04:00
|
|
|
const std::vector<std::string>& ParentHrefs() const ;
|
|
|
|
|
2015-05-16 21:10:38 +03:00
|
|
|
protected :
|
2012-05-01 19:24:40 +04:00
|
|
|
std::string m_title ;
|
|
|
|
std::string m_filename ;
|
2015-05-16 12:35:41 +03:00
|
|
|
bool m_is_dir ;
|
2012-05-20 10:57:25 +04:00
|
|
|
std::string m_md5 ;
|
2012-05-01 19:24:40 +04:00
|
|
|
std::string m_etag ;
|
2012-05-06 18:27:52 +04:00
|
|
|
std::string m_resource_id ;
|
2012-05-01 19:24:40 +04:00
|
|
|
|
2012-05-12 07:47:51 +04:00
|
|
|
std::vector<std::string> m_parent_hrefs ;
|
2015-05-16 12:35:41 +03:00
|
|
|
|
2012-05-09 19:52:06 +04:00
|
|
|
std::string m_self_href ;
|
|
|
|
std::string m_content_src ;
|
2015-05-16 12:35:41 +03:00
|
|
|
|
|
|
|
bool m_is_editable ;
|
2012-05-01 19:24:40 +04:00
|
|
|
|
2012-06-03 19:58:28 +04:00
|
|
|
long m_change_stamp ;
|
2015-05-16 12:35:41 +03:00
|
|
|
|
2012-05-20 10:57:25 +04:00
|
|
|
DateTime m_mtime ;
|
2012-06-04 20:32:12 +04:00
|
|
|
bool m_is_removed ;
|
2016-09-28 01:19:13 +03:00
|
|
|
u64_t m_size ;
|
2012-05-01 19:24:40 +04:00
|
|
|
} ;
|
|
|
|
|
2015-05-16 21:10:38 +03:00
|
|
|
} // end of namespace gr
|