Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsAboutCacheEntry.cpp File Reference
#include <limits.h>
#include "nsAboutCacheEntry.h"
#include "nsICacheService.h"
#include "nsICacheEntryDescriptor.h"
#include "nsIStorageStream.h"
#include "nsNetUtil.h"
#include "prtime.h"
#include "nsEscape.h"

Go to the source code of this file.

Defines

#define APPEND_ROW(label, value)

Functions

 NS_IMPL_ISUPPORTS4 (nsAboutCacheEntry, nsIAboutModule, nsIChannel, nsIRequest, nsICacheListener) NS_IMETHODIMP nsAboutCacheEntry
static PRTime SecondsToPRTime (PRUint32 t_sec)
static void PrintTimeString (char *buf, PRUint32 bufsize, PRUint32 t_sec)

Define Documentation

#define APPEND_ROW (   label,
  value 
)
Value:
PR_BEGIN_MACRO \
    buffer.AppendLiteral("<tr><td><tt><b>"); \
    buffer.AppendLiteral(label); \
    buffer.AppendLiteral(":</b></tt></td>\n<td><pre>"); \
    buffer.Append(value); \
    buffer.AppendLiteral("</pre></td></tr>\n"); \
    PR_END_MACRO

Definition at line 372 of file nsAboutCacheEntry.cpp.


Function Documentation

Definition at line 54 of file nsAboutCacheEntry.cpp.

{
    NS_ENSURE_ARG_POINTER(aURI);
    nsresult rv;

    nsCOMPtr<nsIChannel> chan;
    rv = NS_NewInputStreamChannel(getter_AddRefs(chan), aURI, nsnull,
                                  NS_LITERAL_CSTRING("application/xhtml+xml"),
                                  NS_LITERAL_CSTRING("utf-8"));
    if (NS_FAILED(rv)) return rv;

    mStreamChannel = do_QueryInterface(chan, &rv);
    if (NS_FAILED(rv)) return rv;

    return CallQueryInterface((nsIAboutModule *) this, result);
}

Here is the call graph for this function:

static void PrintTimeString ( char *  buf,
PRUint32  bufsize,
PRUint32  t_sec 
) [static]

Definition at line 364 of file nsAboutCacheEntry.cpp.

{
    PRExplodedTime et;
    PRTime t_usec = SecondsToPRTime(t_sec);
    PR_ExplodeTime(t_usec, PR_LocalTimeParameters, &et);
    PR_FormatTime(buf, bufsize, "%Y-%m-%d %H:%M:%S", &et);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRTime SecondsToPRTime ( PRUint32  t_sec) [static]

Definition at line 356 of file nsAboutCacheEntry.cpp.

{
    PRTime t_usec, usec_per_sec;
    LL_I2L(t_usec, t_sec);
    LL_I2L(usec_per_sec, PR_USEC_PER_SEC);
    LL_MUL(t_usec, t_usec, usec_per_sec);
    return t_usec;
}

Here is the caller graph for this function: