FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
Public Member Functions | Static Public Member Functions | List of all members
FB::SimpleStreamHelper Class Reference

Helper class for making simple HTTP requests. More...

#include "SimpleStreamHelper.h"

Inheritance diagram for FB::SimpleStreamHelper:
Inheritance graph
Collaboration diagram for FB::SimpleStreamHelper:
Collaboration graph

Public Member Functions

virtual bool onStreamDataArrived (FB::StreamDataArrivedEvent *evt, FB::BrowserStream *)
 Called when data arrives. More...
 
virtual bool onStreamOpened (FB::StreamOpenedEvent *evt, FB::BrowserStream *)
 Called when the stream was opened successfully. More...
 
virtual bool onStreamCompleted (FB::StreamCompletedEvent *evt, FB::BrowserStream *)
 Called when the stream finished downloading successfully. More...
 
- Public Member Functions inherited from FB::DefaultBrowserStreamHandler
 DefaultBrowserStreamHandler ()
 Default constructor. More...
 
virtual ~DefaultBrowserStreamHandler ()
 Destructor. More...
 
virtual bool onStreamAttached (FB::AttachedEvent *evt, FB::BrowserStream *Stream)
 Called when the stream is attached to this handler (may have already been created). More...
 
virtual bool onStreamDetached (FB::DetachedEvent *evt, FB::BrowserStream *Stream)
 Called when the stream is detached from this handler (may not have been destroyed). More...
 
virtual bool onStreamCreated (FB::StreamCreatedEvent *evt, FB::BrowserStream *Stream)
 Called when the stream was created. More...
 
virtual bool onStreamDestroyed (FB::StreamDestroyedEvent *evt, FB::BrowserStream *)
 Called when the stream is destroyed. More...
 
virtual bool onStreamFailedOpen (FB::StreamFailedOpenEvent *evt, FB::BrowserStream *)
 Called when the stream failed to open. More...
 
virtual const
FB::BrowserStreamPtr & 
getStream () const
 Call to get the stream associated with this handler. Returns empty shared_ptr if none. More...
 
virtual bool cancel ()
 Cancels the stream. More...
 
- Public Member Functions inherited from FB::PluginEventSink
virtual bool HandleEvent (PluginEvent *event, PluginEventSource *source)=0
 Called by the browser when a system event needs to be handled, such as a mouse event, a keyboard event, or a drawing event. More...
 

Static Public Member Functions

static FB::SimpleStreamHelperPtr AsyncRequest (const BrowserHostConstPtr &host, const BrowserStreamRequest &req)
 Creates an asynchronous HTTP request from the provided BrowserStreamRequest. More...
 
static FB::SimpleStreamHelperPtr AsyncRequest (const BrowserHostConstPtr &host, const BrowserStreamPtr &stream, const BrowserStreamRequest &req)
 Creates an asynchronous HTTP request from the provided BrowserStreamRequest and existing stream object. More...
 
static FB::SimpleStreamHelperPtr AsyncGet (const FB::BrowserHostPtr &host, const FB::URI &uri, const HttpCallback &callback, bool cache=true, size_t bufferSize=128 *1024)
 Starts an asynchronous HTTP get request. More...
 
static FB::SimpleStreamHelperPtr AsyncPost (const FB::BrowserHostPtr &host, const FB::URI &uri, const std::string &postdata, const HttpCallback &callback, bool cache=true, size_t bufferSize=128 *1024)
 Starts an asynchronous HTTP post request. More...
 
static HttpStreamResponsePtr SynchronousGet (const FB::BrowserHostPtr &host, const FB::URI &uri, const bool cache=true, const size_t bufferSize=128 *1024)
 Do not call from the main thread! Starts a Synchronous HTTP get request. More...
 
static HttpStreamResponsePtr SynchronousRequest (const FB::BrowserHostPtr &host, const BrowserStreamRequest &req)
 Do not call from the main thread! Starts a Synchronous HTTP request. More...
 
static HttpStreamResponsePtr SynchronousPost (const FB::BrowserHostPtr &host, const FB::URI &uri, const std::string &postdata, const bool cache=true, const size_t bufferSize=128 *1024)
 Do not call from the main thread! Starts a Synchronous HTTP POST request. More...
 

Additional Inherited Members

- Protected Member Functions inherited from FB::DefaultBrowserStreamHandler
virtual void setStream (const FB::BrowserStreamPtr &stream)
 Call to set the stream associated with this handler. More...
 
virtual void clearStream ()
 Call to clear the stream associated with this handler. More...
 
- Protected Attributes inherited from FB::DefaultBrowserStreamHandler
BrowserStreamPtr stream
 stream instance, don't use yourself More...
 

Detailed Description

Helper class for making simple HTTP requests.

This class can be used as a helper class to make HTTP requests easily using BrowserStreams

See Also
FB::SimpleStreamHelper::AsyncGet
FB::SimpleStreamHelper::SynchronousGet

Definition at line 74 of file SimpleStreamHelper.h.


The documentation for this class was generated from the following files: