Back to index

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

#include <nsPSMDetectors.h>

Inheritance diagram for nsJAStringPSMDetector:
Inheritance graph
Collaboration diagram for nsJAStringPSMDetector:
Collaboration graph

List of all members.

Public Member Functions

 nsJAStringPSMDetector ()
NS_IMETHOD DoIt (const char *aBuf, PRUint32 aLen, const char **oCharset, nsDetectionConfident &oConfident)

Protected Member Functions

virtual void Report (const char *charset)

Detailed Description

Definition at line 298 of file nsPSMDetectors.h.

Constructor & Destructor Documentation

Member Function Documentation

NS_IMETHODIMP nsXPCOMStringDetector::DoIt ( const char *  aBuf,
PRUint32  aLen,
const char **  oCharset,
nsDetectionConfident oConfident 
) [virtual, inherited]

Implements nsIStringCharsetDetector.

Definition at line 550 of file nsPSMDetectors.cpp.

  mResult = nsnull;
  this->HandleData(aBuf, aLen);

  if( nsnull == mResult) {
     // If we have no result and detector is done - answer no match
        *oCharset = nsnull;
        oConfident = eNoAnswerMatch;
     } else {
        // if we have no answer force the Done method and find the answer
        // if we find one, return it as eBestAnswer
        *oCharset = mResult;
        oConfident = (mResult) ? eBestAnswer : eNoAnswerMatch ;
  } else {
     // If we have answer, return as eSureAnswer
     *oCharset = mResult;
     oConfident = eSureAnswer;
  return NS_OK;

Here is the call graph for this function:

void nsXPCOMStringDetector::Report ( const char *  charset) [protected, virtual, inherited]

Implements nsPSMDetector.

Definition at line 545 of file nsPSMDetectors.cpp.

  mResult = charset;

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