Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
RobotSinkObserver Class Reference
Inheritance diagram for RobotSinkObserver:
Inheritance graph
[legend]
Collaboration diagram for RobotSinkObserver:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RobotSinkObserver ()
virtual ~RobotSinkObserver ()
NS_DECL_ISUPPORTS NS_IMETHOD ProcessLink (const nsString &aURLSpec)
NS_IMETHOD VerifyDirectory (const char *verify_dir)

Detailed Description

Definition at line 61 of file nsDebugRobot.cpp.


Constructor & Destructor Documentation

Definition at line 63 of file nsDebugRobot.cpp.

                      {
  }
virtual RobotSinkObserver::~RobotSinkObserver ( ) [inline, virtual]

Definition at line 66 of file nsDebugRobot.cpp.

                               {
  }

Member Function Documentation

Implements nsIRobotSinkObserver.

Definition at line 90 of file nsDebugRobot.cpp.

{
  if (!g_bHitTop) {
     
     nsAutoString str;
     // Geez this is ugly. temporary hack to only process html files
     str.Truncate();
     nsString(aURLSpec).Right(str,1);
     if (!str.EqualsLiteral("/"))
     {
        str.Truncate();
        nsString(aURLSpec).Right(str,4);
        if (!str.EqualsLiteral("html"))
        {
           str.Truncate();
           nsString(aURLSpec).Right(str,3);
           if (!str.EqualsLiteral("htm"))
              return NS_OK;
        }
     }
     PRInt32 nCount = g_duplicateList->Count();
     if (nCount > 0)
     {
        for (PRInt32 n = 0; n < nCount; ++n)
        {
           nsString * pstr = (nsString *)g_duplicateList->ElementAt(n);
           if (pstr->Equals(aURLSpec)) {
              fputs ("Robot: (duplicate '",stdout);
              fputs (NS_LossyConvertUCS2toASCII(aURLSpec).get(),stdout);
              fputs ("')\n",stdout);
              return NS_OK;
           }
        }
     }
     g_duplicateList->AppendElement(new nsString(aURLSpec));
     str.Truncate();
     nsString(aURLSpec).Left(str,5);
     if (str.EqualsLiteral("http:")) {
        ++g_iProcessed;
        if (g_iProcessed == (g_iMaxProcess > 0 ? g_iMaxProcess-1 : 0))
           g_bHitTop = PR_TRUE;
        g_workList->AppendElement(new nsString(aURLSpec));
     }
     else {
        fputs ("Robot: (cannot process URL types '",stdout);
        fputs (NS_LossyConvertUCS2toASCII(aURLSpec).get(),stdout);
        fputs ("')\n",stdout);
     }
  }
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP RobotSinkObserver::VerifyDirectory ( const char *  verify_dir) [virtual]

Implements nsIRobotSinkObserver.

Definition at line 85 of file nsDebugRobot.cpp.

{
   return NS_OK;
}

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