ROOT » NET » NET » TS3HTTPRequest

class TS3HTTPRequest: public TObject


TS3HTTPRequest

An object of this class represents an HTTP request extended to be
compatible with Amazon's S3 protocol.
Specifically, such a request contains an 'Authorization' header with
information used by the S3 server for authenticating this request.
The authentication information is computed based on a pair of access
key and secret key which are both provided to the user by the S3
service provider (e.g. Amazon, Google, etc.).
The secret key is used to compute a signature of selected fields in
the request. The algorithm for computing the signature is documented
in:

Google storage:
 http://code.google.com/apis/storage/docs/reference/v1/developer-guidev1.html#authentication

Amazon:
 http://docs.aws.amazon.com/AmazonS3/latest/dev/S3_Authentication2.html


Function Members (Methods)

public:
virtual~TS3HTTPRequest()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const TString&GetAccessKey() const
TStringGetAuthType() const
const TString&GetBucket() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
const TString&GetHost() const
TS3HTTPRequest::EHTTPVerbGetHTTPVerb() const
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
const TString&GetObjectKey() const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
TStringGetRequest(TS3HTTPRequest::EHTTPVerb httpVerb, Bool_t appendCRLF = kTRUE)
const TString&GetSecretKey() const
const TString&GetTimeStamp() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TS3HTTPRequest&operator=(const TS3HTTPRequest&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
TS3HTTPRequest&SetAccessKey(const TString& accessKey)
TS3HTTPRequest&SetAuthKeys(const TString& accessKey, const TString& secretKey)
TS3HTTPRequest&SetAuthType(TS3HTTPRequest::EAuthType authType)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
TS3HTTPRequest&SetBucket(const TString& bucket)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
TS3HTTPRequest&SetHost(const TString& host)
TS3HTTPRequest&SetObjectKey(const TString& objectKey)
static voidTObject::SetObjectStat(Bool_t stat)
TS3HTTPRequest&SetSecretKey(const TString& secretKey)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TS3HTTPRequest()
TS3HTTPRequest(const TS3HTTPRequest& m)
TS3HTTPRequest(TS3HTTPRequest::EHTTPVerb httpVerb, const TString& host, const TString& bucket, const TString& objectKey, TS3HTTPRequest::EAuthType authType, const TString& accessKey, const TString& secretKey)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
TStringComputeSignature(TS3HTTPRequest::EHTTPVerb httpVerb) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
TStringHTTPVerbToTString(TS3HTTPRequest::EHTTPVerb httpVerb) const
TStringMakeAuthHeader(TS3HTTPRequest::EHTTPVerb httpVerb) const
TStringMakeAuthPrefix() const
TStringMakeDateHeader() const
TStringMakeHostHeader() const
TStringMakeRequestLine(TS3HTTPRequest::EHTTPVerb httpVerb) const
voidTObject::MakeZombie()
TS3HTTPRequest&SetTimeStamp()

Data Members

public:
static TS3HTTPRequest::EAuthTypekAmazon
static TObject::<anonymous>TObject::kBitMask
static TS3HTTPRequest::EHTTPVerbkCOPY
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TS3HTTPRequest::EHTTPVerbkDELETE
static TS3HTTPRequest::EHTTPVerbkGET
static TS3HTTPRequest::EAuthTypekGoogle
static TS3HTTPRequest::EHTTPVerbkHEAD
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::<anonymous>TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TS3HTTPRequest::EAuthTypekNoAuth
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::<anonymous>TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::<anonymous>TObject::kOverwrite
static TS3HTTPRequest::EHTTPVerbkPOST
static TS3HTTPRequest::EHTTPVerbkPUT
static TObject::<anonymous>TObject::kSingleKey
static TObject::<anonymous>TObject::kWriteDelete
static TObject::<anonymous>TObject::kZombie
private:
TStringfAccessKeyAccess key (for authentication)
TS3HTTPRequest::EAuthTypefAuthTypeAuthentication type
TStringfBucketBucket name
TStringfHostHost name
TStringfObjectKeyObject key
TStringfSecretKeySecret key (for authentication)
TStringfTimeStampRequest time stamp
TS3HTTPRequest::EHTTPVerbfVerbHTTP Verb

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TS3HTTPRequest()
TS3HTTPRequest(TS3HTTPRequest::EHTTPVerb httpVerb, const TString& host, const TString& bucket, const TString& objectKey, TS3HTTPRequest::EAuthType authType, const TString& accessKey, const TString& secretKey)
 Default constructor
TS3HTTPRequest(const TS3HTTPRequest& m)
 Copy constructor
TString ComputeSignature(TS3HTTPRequest::EHTTPVerb httpVerb) const
 Returns this request's signature
TString HTTPVerbToTString(TS3HTTPRequest::EHTTPVerb httpVerb) const
TS3HTTPRequest& SetTimeStamp()
 Sets this request's time stamp according to:
   http://code.google.com/apis/storage/docs/reference-headers.html#date
TString MakeRequestLine(TS3HTTPRequest::EHTTPVerb httpVerb) const
 Returns the first line of a HTTP request for this object. Note that since
 we don't use the virtual host syntax which is supported by Amazon, we
 must include the bucket name in thr resource. For example, we don't use
 http://mybucket.s3.amazonaws.com/path/to/my/file but instead
 http://s3.amazonaws.com/mybucket/path/to/my/file so the HTTP request
 will be of the form "GET /mybucket/path/to/my/file HTTP/1.1"
 Also note that the path must include the leading '/'.
TString MakeHostHeader() const
 Returns the 'Host' header to include in the HTTP request.
TString MakeDateHeader() const
 Returns the date header for this HTTP request
TString MakeAuthPrefix() const
 Returns the authentication prefix
TString MakeAuthHeader(TS3HTTPRequest::EHTTPVerb httpVerb) const
 Returns the authentication header for this HTTP request
TString GetRequest(TS3HTTPRequest::EHTTPVerb httpVerb, Bool_t appendCRLF = kTRUE)
 Returns the HTTP request ready to be sent to the server
TS3HTTPRequest& SetHost(const TString& host)
TS3HTTPRequest& SetBucket(const TString& bucket)
TS3HTTPRequest& SetObjectKey(const TString& objectKey)
TS3HTTPRequest& SetAuthKeys(const TString& accessKey, const TString& secretKey)
TS3HTTPRequest& SetAuthType(TS3HTTPRequest::EAuthType authType)
TS3HTTPRequest& SetAccessKey(const TString& accessKey)
TS3HTTPRequest& SetSecretKey(const TString& secretKey)
virtual ~TS3HTTPRequest()
{ }
EHTTPVerb GetHTTPVerb() const
{ return fVerb; }
const TString& GetHost() const
{ return fHost; }
const TString& GetBucket() const
{ return fBucket; }
const TString& GetObjectKey() const
{ return fObjectKey; }
const TString& GetTimeStamp() const
{ return fTimeStamp; }
const TString& GetAccessKey() const
{ return fAccessKey; }
const TString& GetSecretKey() const
{ return fSecretKey; }
TString GetAuthType() const
{ return fAuthType; }