Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions
nsZHPSMDetector Class Reference

#include <nsPSMDetectors.h>

Inheritance diagram for nsZHPSMDetector:
Inheritance graph
[legend]
Collaboration diagram for nsZHPSMDetector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsZHPSMDetector ()
NS_IMETHOD Init (nsICharsetDetectionObserver *aObserver)
NS_IMETHOD DoIt (const char *aBuf, PRUint32 aLen, PRBool *oDontFeedMe)
NS_IMETHOD Done ()

Protected Member Functions

virtual void Report (const char *charset)

Detailed Description

Definition at line 347 of file nsPSMDetectors.h.


Constructor & Destructor Documentation


Member Function Documentation

NS_IMETHODIMP nsXPCOMDetector::DoIt ( const char *  aBuf,
PRUint32  aLen,
PRBool oDontFeedMe 
) [virtual, inherited]

Implements nsICharsetDetector.

Definition at line 511 of file nsPSMDetectors.cpp.

{
  NS_ASSERTION(mObserver != nsnull , "have not init yet");

  if((nsnull == aBuf) || (nsnull == oDontFeedMe))
     return NS_ERROR_ILLEGAL_VALUE;

  this->HandleData(aBuf, aLen);
  *oDontFeedMe = mDone;
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsXPCOMDetector::Done ( ) [virtual, inherited]

Implements nsICharsetDetector.

Definition at line 524 of file nsPSMDetectors.cpp.

{
  NS_ASSERTION(mObserver != nsnull , "have not init yet");
  this->DataEnd();
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsXPCOMDetector::Init ( nsICharsetDetectionObserver aObserver) [virtual, inherited]

Implements nsICharsetDetector.

Definition at line 500 of file nsPSMDetectors.cpp.

{
  NS_ASSERTION(mObserver == nsnull , "Init twice");
  if(nsnull == aObserver)
     return NS_ERROR_ILLEGAL_VALUE;

  mObserver = aObserver;
  return NS_OK;
}
void nsXPCOMDetector::Report ( const char *  charset) [protected, virtual, inherited]

Implements nsPSMDetector.

Definition at line 531 of file nsPSMDetectors.cpp.

{
  mObserver->Notify(charset, eSureAnswer);
}

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