mx::HTTPGetStreamSourceCore Class Reference
[I/O Kit]

Common functionality for HTTP GET stream sources. More...

#include <HTTPGetStreamSourceCore.h>

Inheritance diagram for mx::HTTPGetStreamSourceCore:

mxmObject mx::IHTTPGetStreamSource mx::IAsyncStreamSource mx::ISupportsHostSpecification mx::ISupportsWebPageSpecification mx::ISupportsProxySpecification mx::IRequiresExternalAuthenticator mx::IStreamSource mx::IInterface mx::IInterface mx::IInterface mx::IInterface mx::IErrorState mx::IRequiresActivation mx::IInterface mx::IInterface mx::HTTPGetStreamSource List of all members.

Public Slots

void processAuthentication (const QString &user, const QString &password)
 To be activated from an external place after the source core has emitted the authenticationRequest() signal, or, alternatively: the processAuthenticationCancellation() slot.
void processAuthenticationCancellation ()
 To be activated from an external place after the source core has emitted the authenticationRequest() signal, or, alternatively: the processAuthentication() slot.

Signals

void bytesAvailable ()
 Emitted when bytes have become available to be read.
void authenticationRequest (const QString &msg, bool first_request_for_current_procedure)
 Emitted when during negotiation with the host, need arises to get authentication information about the user.

Public Member Functions

void setHost (const mxmIPAddress &host)
 (Re)implemented.
void setWebPages (const mxmStringList &web_pages)
 (Re)implemented.
void setProxy (const mxmIPAddress &proxy)
 (Re)implemented.
bool activate ()
 (Re)implemented.
mxmQtSignal streamBytesAvailableSignal () const
 (Re)implemented.
mxmQtSignal authenticationRequestSignal () const
 (Re)implemented.
mxmQtSlot processAuthenticationSlot () const
 (Re)implemented.
mxmQtSlot processAuthenticationCancellationSlot () const
 (Re)implemented.
bool errorState ()
 (Re)implemented.
void setErrorState ()
 (Re)implemented.
bool awaitingAuthentication ()
 (Re)implemented.
bool wasAwaitingAuthentication ()
 (Re)implemented.

Protected Attributes

bool Active
mxmIPAddress Host
mxmIPAddress Proxy
bool Connected
bool Disconnected
bool Up
bool ErrorEncountered

Private Types

enum  HTTPNegotiationState {
  SendGET_NoAuth, ReceiveResponseHeader_NoAuth, RaisedAuthenticationDialog, WaitForAuthenticationDialog,
  SendGET_EnteredAuth, ReceiveResponseHeader_EnteredAuth, NegotiationSucceeded, NegotiationFailed
}

Private Slots

void processIncomingBytes ()
 Connected to the encapsuled socket's "incoming-bytes-ready" signal.
void processSocketDisconnected ()
 Connected to the encapsuled socket's "disconnected" signal.

Private Member Functions

virtual void establishConnection ()=0
 To be implemented by subclasses.
virtual void abortConnection ()=0
 To be implemented by subclasses.
virtual bool readChar (char *c)=0
 To be implemented by subclasses.
virtual void send (const mxmString &txt)=0
 To be implemented by subclasses.
void sendGETRequest (const char *user=0, const char *password=0)
 Internal helper method.
bool receiveHTTPHeader ()
 Internal helpermethod.

Private Attributes

bool HostSet
mxmStringList URLList
bool HTTPNegotiationMode
HTTPNegotiationState NegotiationState
char HTTPHeaderBuffer [MX_HTTPGETSTREAMSOURCECORE_HEADERBUFFER_SIZE]
int HTTPHeaderBytesRead
int HTTPHeaderSize
bool AuthenticationEntered
bool AuthenticationDialogRaised
bool AuthenticationDialogWasRaised
mxmString AuthenticationUser
mxmString AuthenticationPassword
bool FirstAuth
int URLAttempt

Detailed Description

Common functionality for HTTP GET stream sources.

Subclasses just have to provide the actual network I/O implementation.

Subclasses might differ in whether or not they support SSL connections or in the efficiency of their network access implementation.

Author:
[khe] Kai Hergenroether


Member Function Documentation

void mx::HTTPGetStreamSourceCore::authenticationRequest const QString &  msg,
bool  first_request_for_current_procedure
[signal]
 

Emitted when during negotiation with the host, need arises to get authentication information about the user.

Originally indended to be connected to an mycpcAuthenticationDialog's raise() slot.

By using the component-oriented signal/slot-mechanism, we avoid doing an upcall to the higher layer of a GUI lib.

virtual bool mx::HTTPGetStreamSourceCore::readChar char *  c  )  [private, pure virtual]
 

To be implemented by subclasses.

Returns:
true in case a character has been read, and false otherwise (no more characters were available)

Implemented in mx::HTTPGetStreamSource.

bool mx::HTTPGetStreamSourceCore::receiveHTTPHeader void   )  [private]
 

Internal helpermethod.

Returns:
true if the complete header has successfully been read into the buffer, or false if header bytes are still missing.

bool mx::HTTPGetStreamSourceCore::wasAwaitingAuthentication  )  [virtual]
 

(Re)implemented.

If the dialog is currently raised the method will return true and the internal raise flag will not be reset.

Implements mx::IRequiresExternalAuthenticator.


The documentation for this class was generated from the following files:
Generated on Fri Jun 29 17:21:06 2007 for MxPEG SDK by  doxygen 1.4.6