1 |
douglas |
676 |
// Url |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _Url_hpp_ |
8 |
|
|
#define _Url_hpp_ |
9 |
|
|
|
10 |
|
|
#include <cxx/platform.hpp> |
11 |
|
|
|
12 |
|
|
#ifdef MENES_PRAGMA_ONCE |
13 |
|
|
#pragma once |
14 |
|
|
#endif |
15 |
|
|
|
16 |
|
|
#include <ctime> |
17 |
|
|
|
18 |
|
|
enum Frequency { always, hourly, daily, weekly, monthly, yearly, never }; |
19 |
|
|
|
20 |
|
|
class Url |
21 |
|
|
{ |
22 |
|
|
cse::String location; |
23 |
douglas |
677 |
std::tm modified; |
24 |
douglas |
676 |
Frequency frequency; |
25 |
|
|
uint8_t priority; |
26 |
|
|
public: |
27 |
douglas |
682 |
Url(const cse::String &location, const std::time_t &modified, Frequency frequency = always, uint8_t priority = 5); |
28 |
douglas |
683 |
Url(const cse::String &location, const std::tm &modified, Frequency frequency = always, uint8_t priority = 5); |
29 |
douglas |
676 |
cse::String GetLocation() const { return location; } |
30 |
|
|
cse::String GetModified() const; |
31 |
|
|
cse::String GetFrequency() const; |
32 |
|
|
cse::String GetPriority() const; |
33 |
|
|
}; |
34 |
|
|
|
35 |
douglas |
705 |
Frequency GetFrequency(const cse::String &frequency); |
36 |
|
|
uint8_t GetPriority(const cse::String &priority); |
37 |
|
|
|
38 |
douglas |
676 |
#endif//_Url_hpp_ |