Back to index

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

#include <nsDebugDetector.h>

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

List of all members.

Public Member Functions

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

Protected Member Functions

virtual void Report ()

Detailed Description

Definition at line 89 of file nsDebugDetector.h.


Constructor & Destructor Documentation

Definition at line 92 of file nsDebugDetector.h.


Member Function Documentation

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

Implements nsICharsetDetector.

Definition at line 71 of file nsDebugDetector.cpp.

{
  NS_ASSERTION(mObserver != nsnull , "have not init yet");
  NS_ASSERTION(mStop == PR_FALSE , "don't call DoIt if we return PR_TRUE in oDontFeedMe");

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

  mBlks++;
  if((k1stBlk == mSel) && (1 == mBlks)) {
     *oDontFeedMe = mStop = PR_TRUE;
     Report();
  } else if((k2ndBlk == mSel) && (2 == mBlks)) {
     *oDontFeedMe = mStop = PR_TRUE;
     Report();
  } else {
     *oDontFeedMe = mStop = PR_FALSE;
  }
   
  return NS_OK;
}

Here is the call graph for this function:

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

Implements nsICharsetDetector.

Definition at line 94 of file nsDebugDetector.cpp.

{
  NS_ASSERTION(mObserver != nsnull , "have not init yet");
  if(klastBlk == mSel)
     Report();
  return NS_OK;
}

Here is the call graph for this function:

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

Implements nsICharsetDetector.

Definition at line 60 of file nsDebugDetector.cpp.

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

  mObserver = aObserver;
  return NS_OK;
}
void nsDebugDetector::Report ( ) [protected, virtual, inherited]

Definition at line 102 of file nsDebugDetector.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


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