#include <Update.h>
Public Types | |
enum | { MIN_OFFSET_HOUR = 0, MAX_OFFSET_HOUR = 23, MIN_INTERVAL = 0, MAX_INTERVAL = 86400, MIN_DEPTH = 0, MAX_DEPTH = 128, SECONDS_PER_HOUR = 3600, SECONDS_PER_MIN = 60 } |
Public Member Functions | |
UpdateEntry () | |
~UpdateEntry () | |
void | Init (int derived_url=0) |
int | ValidURL (char *, char *) |
int | ValidHeaders (char *) |
int | BuildHttpRequest () |
int | ValidHeaderNameChar (char) |
int | ValidSeparatorChar (char) |
int | ValidHour (char *) |
int | ValidInterval (char *) |
int | ValidDepth (char *) |
int | TerminalURL () |
void | SetTerminalStatus (int) |
void | ComputeScheduleTime () |
int | ScheduleNow (time_t) |
LINK (UpdateEntry, link) | |
Data Fields | |
UpdateEntry * | _group_link |
UpdateEntry * | _hash_link |
int | _id |
char * | _url |
URL | _URLhandle |
INK_MD5 | _url_md5 |
int | _terminal_url |
char * | _request_headers |
int | _num_request_headers |
HTTPHdr * | _http_hdr |
HTTPParser | _http_parser |
int | _offset_hour |
int | _interval |
int | _max_depth |
time_t | _start_time |
int | _expired |
int | _scheme_index |
int | _update_event_status |
Ptr< UpdateConfigList > | _indirect_list |
Definition at line 121 of file Update.h.
anonymous enum |
UpdateEntry::UpdateEntry | ( | ) |
Definition at line 225 of file Update.cc.
References _http_parser, and http_parser_init().
UpdateEntry::~UpdateEntry | ( | ) |
Definition at line 234 of file Update.cc.
References _http_hdr, _indirect_list, _request_headers, _url, _URLhandle, ats_free(), HdrHeapSDKHandle::destroy(), HTTPHdr::valid(), and URL::valid().
int UpdateEntry::BuildHttpRequest | ( | ) |
Definition at line 391 of file Update.cc.
References _http_hdr, _http_parser, _request_headers, _url, HTTPHdr::create(), GET_METHOD, http_parser_clear(), http_parser_init(), HTTP_TYPE_REQUEST, HTTP_VERSION, len_GET_METHOD, len_HTTP_VERSION, len_REQUEST_TERMINATOR, len_TERMINATOR, MAX_LINE_LENGTH, PARSE_CONT, HTTPHdr::parse_req(), REQUEST_TERMINATOR, start, and TERMINATOR.
Referenced by UpdateConfigManager::ParseConfigFile(), and RecursiveHttpGet::RecursiveHttpGetEvent().
void UpdateEntry::ComputeScheduleTime | ( | ) |
Definition at line 527 of file Update.cc.
References _expired, _interval, _offset_hour, _start_time, convert_tm(), ink_get_based_hrtime(), and ink_localtime_r().
Referenced by Init(), and UpdateScheduler::ScheduleEvent().
void UpdateEntry::Init | ( | int | derived_url = 0 |
) |
Definition at line 256 of file Update.cc.
References _id, _max_depth, _URLhandle, ComputeScheduleTime(), global_id, URL::scheme_get(), and URL_SCHEME_HTTP.
Referenced by UpdateConfigManager::ParseConfigFile(), and RecursiveHttpGet::RecursiveHttpGetEvent().
UpdateEntry::LINK | ( | UpdateEntry | , | |
link | ||||
) |
int UpdateEntry::ScheduleNow | ( | time_t | cur_time | ) |
Definition at line 565 of file Update.cc.
References _expired, and _start_time.
Referenced by UpdateScheduler::ScheduleEvent().
void UpdateEntry::SetTerminalStatus | ( | int | term_url | ) |
Definition at line 514 of file Update.cc.
References _terminal_url.
Referenced by RecursiveHttpGet::RecursiveHttpGetEvent().
int UpdateEntry::TerminalURL | ( | ) |
Definition at line 520 of file Update.cc.
References _terminal_url.
Referenced by RecursiveHttpGet::RecursiveHttpGetEvent().
int UpdateEntry::ValidDepth | ( | char * | s | ) |
Definition at line 499 of file Update.cc.
References _max_depth, MAX_DEPTH, and MIN_DEPTH.
Referenced by UpdateConfigManager::ParseConfigFile().
int UpdateEntry::ValidHeaderNameChar | ( | char | c | ) |
Definition at line 429 of file Update.cc.
References ValidSeparatorChar().
Referenced by ValidHeaders().
int UpdateEntry::ValidHeaders | ( | char * | s | ) |
Definition at line 295 of file Update.cc.
References _num_request_headers, _request_headers, ats_strdup, and ValidHeaderNameChar().
Referenced by UpdateConfigManager::ParseConfigFile().
int UpdateEntry::ValidHour | ( | char * | s | ) |
Definition at line 472 of file Update.cc.
References _offset_hour, MAX_OFFSET_HOUR, and MIN_OFFSET_HOUR.
Referenced by UpdateConfigManager::ParseConfigFile().
int UpdateEntry::ValidInterval | ( | char * | s | ) |
Definition at line 485 of file Update.cc.
References _interval, MAX_INTERVAL, and MIN_INTERVAL.
Referenced by UpdateConfigManager::ParseConfigFile().
int UpdateEntry::ValidSeparatorChar | ( | char | c | ) |
Definition at line 443 of file Update.cc.
Referenced by ValidHeaderNameChar().
int UpdateEntry::ValidURL | ( | char * | s, | |
char * | e | |||
) |
Definition at line 274 of file Update.cc.
References _url, _URLhandle, ats_strdup, URL::create(), HdrHeapSDKHandle::destroy(), and URL::parse().
Referenced by UpdateConfigManager::ParseConfigFile(), and RecursiveHttpGet::RecursiveHttpGetEvent().
Definition at line 185 of file Update.h.
Referenced by ComputeScheduleTime(), and ScheduleNow().
Definition at line 153 of file Update.h.
Referenced by RecursiveHttpGet::RecursiveHttpGetEvent().
Definition at line 154 of file Update.h.
Referenced by UpdateConfigList::HashAdd().
Definition at line 171 of file Update.h.
Referenced by BuildHttpRequest(), UpdateSM::http_scheme(), and ~UpdateEntry().
Definition at line 172 of file Update.h.
Referenced by BuildHttpRequest(), and UpdateEntry().
int UpdateEntry::_id |
Definition at line 160 of file Update.h.
Referenced by UpdateScheduler::ChildExitEventHandler(), UpdateSM::http_scheme(), Init(), UpdateConfigManager::ParseConfigFile(), RecursiveHttpGet::RecursiveHttpGetEvent(), UpdateScheduler::Schedule(), and UpdateScheduler::ScheduleEvent().
Definition at line 190 of file Update.h.
Referenced by UpdateSM::http_scheme(), UpdateScheduler::Init(), UpdateScheduler::ScheduleEvent(), and ~UpdateEntry().
Definition at line 178 of file Update.h.
Referenced by ComputeScheduleTime(), UpdateConfigManager::ParseConfigFile(), and ValidInterval().
Definition at line 179 of file Update.h.
Referenced by UpdateSM::HandleSMEvent(), UpdateSM::http_scheme(), Init(), UpdateConfigManager::ParseConfigFile(), UpdateScheduler::ScheduleEvent(), and ValidDepth().
Definition at line 170 of file Update.h.
Referenced by UpdateConfigManager::ParseConfigFile(), and ValidHeaders().
Definition at line 177 of file Update.h.
Referenced by ComputeScheduleTime(), UpdateConfigManager::ParseConfigFile(), and ValidHour().
Definition at line 169 of file Update.h.
Referenced by BuildHttpRequest(), UpdateSM::http_scheme(), UpdateConfigManager::ParseConfigFile(), RecursiveHttpGet::RecursiveHttpGetEvent(), ValidHeaders(), and ~UpdateEntry().
Definition at line 187 of file Update.h.
Referenced by UpdateSM::HandleSMEvent().
time_t UpdateEntry::_start_time |
Definition at line 184 of file Update.h.
Referenced by ComputeScheduleTime(), and ScheduleNow().
Definition at line 164 of file Update.h.
Referenced by SetTerminalStatus(), and TerminalURL().
Definition at line 188 of file Update.h.
Referenced by UpdateSM::HandleSMEvent(), UpdateSM::http_scheme_postproc(), and UpdateScheduler::ScheduleEvent().
char* UpdateEntry::_url |
Definition at line 161 of file Update.h.
Referenced by BuildHttpRequest(), UpdateSM::http_scheme(), UpdateConfigManager::ParseConfigFile(), RecursiveHttpGet::RecursiveHttpGetEvent(), UpdateScheduler::Schedule(), UpdateScheduler::ScheduleEvent(), ValidURL(), and ~UpdateEntry().
Definition at line 163 of file Update.h.
Referenced by UpdateConfigList::HashAdd(), and RecursiveHttpGet::RecursiveHttpGetEvent().
Definition at line 162 of file Update.h.
Referenced by UpdateSM::HandleSMEvent(), UpdateSM::http_scheme(), Init(), RecursiveHttpGet::RecursiveHttpGetEvent(), ValidURL(), and ~UpdateEntry().