1 /*
2 	grive: an GPL program to sync a local directory with Google Drive
3 	Copyright (C) 2012  Wan Wai Ho
4 
5 	This program is free software; you can redistribute it and/or
6 	modify it under the terms of the GNU General Public License
7 	as published by the Free Software Foundation version 2
8 	of the License.
9 
10 	This program is distributed in the hope that it will be useful,
11 	but WITHOUT ANY WARRANTY; without even the implied warranty of
12 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 	GNU General Public License for more details.
14 
15 	You should have received a copy of the GNU General Public License
16 	along with this program; if not, write to the Free Software
17 	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 */
19 
20 #pragma once
21 
22 #include "base/Entry.hh"
23 
24 #include <vector>
25 
26 #include <string>
27 
28 namespace gr {
29 
30 namespace http
31 {
32 	class Agent ;
33 }
34 
35 class Feed
36 {
37 public :
38 	typedef std::vector<Entry> Entries;
39 	typedef std::vector<Entry>::const_iterator iterator;
40 
41 public :
42 	Feed( const std::string& url );
43 	virtual bool GetNext( http::Agent *http ) = 0 ;
44 	virtual ~Feed() = 0 ;
45 	iterator begin() const ;
46 	iterator end() const ;
47 
48 protected :
49 	Entries m_entries ;
50 	std::string m_next ;
51 } ;
52 
53 } // end of namespace gr
54