ArmSys Support
ArmsysApi  0.12.18

#include <BHttpServer.h>

Inheritance diagram for BHttpServer:
BTask

Public Types

enum  ReadType { ReadTypeData, ReadTypeLine, ReadTypeDataLine }
 

Public Member Functions

 BHttpServer (BUInt rxFifoSize=1500, BUInt txFifoSize=1500)
 
BError init ()
 
void run ()
 The tasks main run loop. More...
 
virtual BError processUrl ()
 
virtual BError processHome ()
 
virtual BError pageSend (const char *title, const char *str)
 
virtual BError pageSendError (const char *str, const char *status="403 Error")
 
virtual BError pageSendHead (const char *title)
 
virtual BError pageSendTail ()
 
void cookieSet (BString name, BString value)
 
BString cookieGet (BString name)
 
void writeTableRow (const char *name, const char *title, const char *value, const char *units=0, int errNum=0)
 
void writeTableInput (const char *name, const char *title, const char *type, const char *value, const char **args=0)
 
void writeTableInput (const char *name, const char *title, const char *type, const char *value, BString str)
 
BError writeHead (const char *status, const char *contentType, BUInt size=0, Bool cache=0, Bool chunked=0, BStringList extra=BStringList())
 
BError writeString (const char *str)
 
BError writeChunk (const void *data, int len)
 
BError writeFlush ()
 
BError writeTail ()
 
virtual BError setHeader (const char *status, const char *contentType, BUInt size=0, Bool cache=0, Bool chunked=0, BStringList extra=BStringList())
 
virtual BError processRequest ()
 
BError readData (BUInt len, BUInt32 &nt, ReadType readType)
 
- Public Member Functions inherited from BTask
 BTask (const char *name="", BUInt stackSize=1024, BUInt priority=1)
 
 ~BTask ()
 
void init (const char *name, BUInt stackSize=1024, BUInt priority=1)
 
BError start ()
 Starts the task running. More...
 
void stop ()
 Stops the task. More...
 
void setPriority (BUInt priority)
 Set the priority of the task: 0 upwards. More...
 
void delayMs (BUInt ms)
 Delay for a time in ms. More...
 

Protected Member Functions

void * function ()
 
virtual BError devInit ()
 
virtual void devRun ()
 
virtual BError devWrite (const void *data, BUInt len, BUInt32 &nt)
 
virtual BError devProcess (Bool wait)
 

Protected Attributes

BFifoChar orxFifo
 
BFifoChar otxFifo
 
char * obuffer
 
BUInt obufferNext
 
BString ocmd
 
BString ourl
 
BString oget
 
BUInt ocontentLen
 
BString ocontentTypeRecv
 
BString ocontentTypeSend
 
BString oboundary
 
BString oauthorisation
 
BDictString ocookies
 
BDictString ocookiesSend
 
const char * ohead_status
 
const char * ohead_contentType
 
BUInt ohead_size
 
Bool ohead_cache
 
Bool ohead_chunked
 
BStringList ohead_extra
 
struct netconn * osocketListen
 
struct netconn * osocket
 
- Protected Attributes inherited from BTask
const char * oname
 
BUInt ostackSize
 
BUInt opriority
 
TaskHandle_t otask
 
Bool orunning
 

Additional Inherited Members

- Static Public Member Functions inherited from BTask
static void runTasks ()
 Main run tasks loop. More...
 

Member Enumeration Documentation

◆ ReadType

Enumerator
ReadTypeData 
ReadTypeLine 
ReadTypeDataLine 

Constructor & Destructor Documentation

◆ BHttpServer()

BHttpServer::BHttpServer ( BUInt  rxFifoSize = 1500,
BUInt  txFifoSize = 1500 
)

Member Function Documentation

◆ cookieGet()

BString BHttpServer::cookieGet ( BString  name)

◆ cookieSet()

void BHttpServer::cookieSet ( BString  name,
BString  value 
)

◆ devInit()

BError BHttpServer::devInit ( )
protectedvirtual

◆ devProcess()

BError BHttpServer::devProcess ( Bool  wait)
protectedvirtual

◆ devRun()

void BHttpServer::devRun ( )
protectedvirtual

◆ devWrite()

BError BHttpServer::devWrite ( const void *  data,
BUInt  len,
BUInt32 nt 
)
protectedvirtual

◆ function()

void * BHttpServer::function ( )
protected

◆ init()

BError BHttpServer::init ( )

◆ pageSend()

BError BHttpServer::pageSend ( const char *  title,
const char *  str 
)
virtual

◆ pageSendError()

BError BHttpServer::pageSendError ( const char *  str,
const char *  status = "403 Error" 
)
virtual

◆ pageSendHead()

BError BHttpServer::pageSendHead ( const char *  title)
virtual

◆ pageSendTail()

BError BHttpServer::pageSendTail ( )
virtual

◆ processHome()

BError BHttpServer::processHome ( )
virtual

◆ processRequest()

BError BHttpServer::processRequest ( )
virtual

◆ processUrl()

BError BHttpServer::processUrl ( )
virtual

◆ readData()

BError BHttpServer::readData ( BUInt  len,
BUInt32 nt,
ReadType  readType 
)

◆ run()

void BHttpServer::run ( )
virtual

The tasks main run loop.

Reimplemented from BTask.

◆ setHeader()

BError BHttpServer::setHeader ( const char *  status,
const char *  contentType,
BUInt  size = 0,
Bool  cache = 0,
Bool  chunked = 0,
BStringList  extra = BStringList() 
)
virtual

◆ writeChunk()

BError BHttpServer::writeChunk ( const void *  data,
int  len 
)

◆ writeFlush()

BError BHttpServer::writeFlush ( )

◆ writeHead()

BError BHttpServer::writeHead ( const char *  status,
const char *  contentType,
BUInt  size = 0,
Bool  cache = 0,
Bool  chunked = 0,
BStringList  extra = BStringList() 
)

◆ writeString()

BError BHttpServer::writeString ( const char *  str)

◆ writeTableInput() [1/2]

void BHttpServer::writeTableInput ( const char *  name,
const char *  title,
const char *  type,
const char *  value,
const char **  args = 0 
)

◆ writeTableInput() [2/2]

void BHttpServer::writeTableInput ( const char *  name,
const char *  title,
const char *  type,
const char *  value,
BString  str 
)

◆ writeTableRow()

void BHttpServer::writeTableRow ( const char *  name,
const char *  title,
const char *  value,
const char *  units = 0,
int  errNum = 0 
)

◆ writeTail()

BError BHttpServer::writeTail ( )

Member Data Documentation

◆ oauthorisation

BString BHttpServer::oauthorisation
protected

◆ oboundary

BString BHttpServer::oboundary
protected

◆ obuffer

char* BHttpServer::obuffer
protected

◆ obufferNext

BUInt BHttpServer::obufferNext
protected

◆ ocmd

BString BHttpServer::ocmd
protected

◆ ocontentLen

BUInt BHttpServer::ocontentLen
protected

◆ ocontentTypeRecv

BString BHttpServer::ocontentTypeRecv
protected

◆ ocontentTypeSend

BString BHttpServer::ocontentTypeSend
protected

◆ ocookies

BDictString BHttpServer::ocookies
protected

◆ ocookiesSend

BDictString BHttpServer::ocookiesSend
protected

◆ oget

BString BHttpServer::oget
protected

◆ ohead_cache

Bool BHttpServer::ohead_cache
protected

◆ ohead_chunked

Bool BHttpServer::ohead_chunked
protected

◆ ohead_contentType

const char* BHttpServer::ohead_contentType
protected

◆ ohead_extra

BStringList BHttpServer::ohead_extra
protected

◆ ohead_size

BUInt BHttpServer::ohead_size
protected

◆ ohead_status

const char* BHttpServer::ohead_status
protected

◆ orxFifo

BFifoChar BHttpServer::orxFifo
protected

◆ osocket

struct netconn* BHttpServer::osocket
protected

◆ osocketListen

struct netconn* BHttpServer::osocketListen
protected

◆ otxFifo

BFifoChar BHttpServer::otxFifo
protected

◆ ourl

BString BHttpServer::ourl
protected

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