Data Structures | Defines | Typedefs | Functions | Variables

Update.cc File Reference

A brief file description. More...

#include "libts.h"
#include "Main.h"
#include "Update.h"
#include "ProxyConfig.h"
#include "StatSystem.h"
#include "HttpUpdateSM.h"
#include "HttpDebugNames.h"
#include "URL.h"
#include "HdrUtils.h"
#include <records/I_RecHttp.h>
#include "I_Layout.h"
Include dependency graph for Update.cc:

Go to the source code of this file.

Data Structures

struct  schemes_descriptor

Defines

#define UpdateEstablishStaticConfigInteger(_ix, _n)   REC_EstablishStaticConfigInteger(_ix,_n); \
#define UPDATE_INCREMENT_DYN_STAT(x)   RecIncrRawStat(update_rsb, mutex->thread_holding, (int) x, 1);
#define UPDATE_DECREMENT_DYN_STAT(x)   RecIncrRawStat(update_rsb, mutex->thread_holding, (int) x, -1);
#define UPDATE_READ_DYN_STAT(x, C, S)
#define UPDATE_CLEAR_DYN_STAT(x)
#define UPDATE_ConfigReadInteger   REC_ConfigReadInteger
#define UPDATE_ConfigReadString   REC_ConfigReadString
#define UPDATE_RegisterConfigUpdateFunc   REC_RegisterConfigUpdateFunc

Typedefs

typedef int(UpdateConfigManager::* UpdateConfigManagerContHandler )(int, void *)

Functions

void init_proto_schemes ()
void init_supported_proto_schemes ()

Variables

RecRawStatBlockupdate_rsb
static const char *const GET_METHOD = "GET "
static const char *const HTTP_VERSION = " HTTP/1.0"
static const char *const REQUEST_TERMINATOR = "\r\n\r\n"
static const char *const TERMINATOR = "\r\n"
static const char *const HTML_COMMENT_TAG = "!--"
static const char *const HTML_COMMENT_END = "-->"
static const int MAX_LINE_LENGTH = (32 * 1024)
static int len_GET_METHOD = 0
static int len_HTTP_VERSION = 0
static int len_REQUEST_TERMINATOR = 0
static int len_TERMINATOR = 0
struct html_tag update_allowable_html_tags []
struct schemes_descriptor proto_schemes []
struct schemes_descriptor supported_proto_schemes []
static int global_id = 1
UpdateManager updateManager
struct dispatch_entry scheme_dispatch_table [UpdateSM::N_SCHEMES]
struct dispatch_entry scheme_post_dispatch_table [UpdateSM::N_SCHEMES]
ClassAllocator< ObjectReloadContObjectReloadContAllocator ("ObjectReloadCont")

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file Update.cc.


Define Documentation

#define UPDATE_CLEAR_DYN_STAT (   x  ) 
Value:
do { \
        RecSetRawStatSum(update_rsb, x, 0); \
        RecSetRawStatCount(update_rsb, x, 0); \
} while (0);

Definition at line 50 of file Update.cc.

Referenced by UpdateConfigManager::init().

#define UPDATE_ConfigReadInteger   REC_ConfigReadInteger

Definition at line 56 of file Update.cc.

#define UPDATE_ConfigReadString   REC_ConfigReadString

Definition at line 57 of file Update.cc.

#define UPDATE_DECREMENT_DYN_STAT (   x  )     RecIncrRawStat(update_rsb, mutex->thread_holding, (int) x, -1);

Definition at line 44 of file Update.cc.

Referenced by UpdateScheduler::ScheduleEvent().

#define UPDATE_INCREMENT_DYN_STAT (   x  )     RecIncrRawStat(update_rsb, mutex->thread_holding, (int) x, 1);

Definition at line 42 of file Update.cc.

Referenced by UpdateScheduler::Schedule(), and UpdateScheduler::ScheduleEvent().

#define UPDATE_READ_DYN_STAT (   x,
  C,
  S 
)
Value:
RecGetRawStatCount(update_rsb, (int) x, &C); \
        RecGetRawStatSum(update_rsb, (int) x, &S);

Definition at line 46 of file Update.cc.

Referenced by UpdateScheduler::Schedule().

#define UPDATE_RegisterConfigUpdateFunc   REC_RegisterConfigUpdateFunc

Definition at line 58 of file Update.cc.

#define UpdateEstablishStaticConfigInteger (   _ix,
  _n 
)    REC_EstablishStaticConfigInteger(_ix,_n); \

Definition at line 39 of file Update.cc.

Referenced by UpdateConfigManager::init().


Typedef Documentation

typedef int(UpdateConfigManager::* UpdateConfigManagerContHandler)(int, void *)

Definition at line 700 of file Update.cc.


Function Documentation

void init_proto_schemes (  ) 

Definition at line 145 of file Update.cc.

References schemes_descriptor::tag, and schemes_descriptor::tag_len.

Referenced by UpdateManager::start().

void init_supported_proto_schemes (  ) 

Definition at line 154 of file Update.cc.

References schemes_descriptor::tag, and schemes_descriptor::tag_len.

Referenced by UpdateManager::start().


Variable Documentation

const char* const GET_METHOD = "GET " [static]
int global_id = 1 [static]

Definition at line 142 of file Update.cc.

Referenced by ObjectReloadCont::Init(), RecursiveHttpGet::Init(), and UpdateEntry::Init().

const char* const HTML_COMMENT_END = "-->" [static]

Definition at line 69 of file Update.cc.

Referenced by HtmlParser::ScanHtmlForURL().

const char* const HTML_COMMENT_TAG = "!--" [static]

Definition at line 68 of file Update.cc.

Referenced by HtmlParser::ScanHtmlForURL().

const char* const HTTP_VERSION = " HTTP/1.0" [static]
int len_GET_METHOD = 0 [static]
int len_HTTP_VERSION = 0 [static]
int len_REQUEST_TERMINATOR = 0 [static]
int len_TERMINATOR = 0 [static]
const int MAX_LINE_LENGTH = (32 * 1024) [static]

Definition at line 104 of file Update.cc.

const char* const REQUEST_TERMINATOR = "\r\n\r\n" [static]
struct dispatch_entry scheme_dispatch_table[UpdateSM::N_SCHEMES]
Initial value:

Definition at line 1514 of file Update.cc.

Referenced by UpdateSM::HandleSMEvent().

struct dispatch_entry scheme_post_dispatch_table[UpdateSM::N_SCHEMES]
Initial value:

Definition at line 1518 of file Update.cc.

Referenced by UpdateSM::HandleSMEvent().

Initial value:
 {
  {"http:",},
  {NULL, 0}
}

Definition at line 137 of file Update.cc.

const char* const TERMINATOR = "\r\n" [static]
Initial value:
 {
  {"a", "href"},
  {"img", "src"},
  {"img", "href"},
  {"body", "background"},
  {"frame", "src"},
  {"iframe", "src"},
  {"fig", "src"},
  {"overlay", "src"},
  {"applet", "code"},
  {"script", "src"},
  {"embed", "src"},
  {"bgsound", "src"},
  {"area", "href"},
  {"base", "href"},             
  {"meta", "content"},          
  {NULL, NULL}
}

Definition at line 79 of file Update.cc.

Definition at line 37 of file Update.cc.

Definition at line 698 of file Update.cc.

Referenced by main().