Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsHttp.h File Reference
#include "plstr.h"
#include "prlog.h"
#include "prtime.h"
#include "nsISupportsUtils.h"
#include "nsPromiseFlatString.h"
#include "nsURLHelper.h"
#include "netCore.h"
#include "nsHttpAtomList.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nsHttpAtom
struct  nsHttp

Defines

#define LOG1(args)   PR_LOG(gHttpLog, 1, args)
#define LOG2(args)   PR_LOG(gHttpLog, 2, args)
#define LOG3(args)   PR_LOG(gHttpLog, 3, args)
#define LOG4(args)   PR_LOG(gHttpLog, 4, args)
#define LOG(args)   LOG4(args)
#define LOG1_ENABLED()   PR_LOG_TEST(gHttpLog, 1)
#define LOG2_ENABLED()   PR_LOG_TEST(gHttpLog, 2)
#define LOG3_ENABLED()   PR_LOG_TEST(gHttpLog, 3)
#define LOG4_ENABLED()   PR_LOG_TEST(gHttpLog, 4)
#define LOG_ENABLED()   LOG4_ENABLED()
#define NS_HTTP_SEGMENT_SIZE   4096
#define NS_HTTP_SEGMENT_COUNT   16
#define NS_HTTP_MAX_ODA_SIZE   (NS_HTTP_SEGMENT_SIZE * 4)
#define NS_HTTP_VERSION_UNKNOWN   0
#define NS_HTTP_VERSION_0_9   9
#define NS_HTTP_VERSION_1_0   10
#define NS_HTTP_VERSION_1_1   11
#define NS_HTTP_ALLOW_KEEPALIVE   (1<<0)
#define NS_HTTP_ALLOW_PIPELINING   (1<<1)
#define NS_HTTP_STICKY_CONNECTION   (1<<2)
#define NS_HTTP_MAX_PIPELINED_REQUESTS   8
#define NS_HTTP_DEFAULT_PORT   80
#define NS_HTTPS_DEFAULT_PORT   443
#define NS_HTTP_HEADER_SEPS   ", \t"
#define HTTP_ATOM(_name, _value)   static nsHttpAtom _name;
#define NowInSeconds()   PRTimeToSeconds(PR_Now())
#define CLAMP(x, low, high)   (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
#define strdup_if(s)   (s ? nsCRT::strdup(s) : nsnull)
#define QVAL_TO_UINT(q)   ((unsigned int) ((q + 0.05) * 10.0))
#define HTTP_LWS   " \t"

Typedefs

typedef PRUint8 nsHttpVersion

Functions

static PRUint32 PRTimeToSeconds (PRTime t_usec)

Define Documentation

#define CLAMP (   x,
  low,
  high 
)    (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))

Definition at line 205 of file nsHttp.h.

#define HTTP_ATOM (   _name,
  _value 
)    static nsHttpAtom _name;

Definition at line 181 of file nsHttp.h.

#define HTTP_LWS   " \t"

Definition at line 213 of file nsHttp.h.

#define LOG (   args)    LOG4(args)

Definition at line 75 of file nsHttp.h.

#define LOG1 (   args)    PR_LOG(gHttpLog, 1, args)

Definition at line 71 of file nsHttp.h.

#define LOG1_ENABLED ( )    PR_LOG_TEST(gHttpLog, 1)

Definition at line 77 of file nsHttp.h.

#define LOG2 (   args)    PR_LOG(gHttpLog, 2, args)

Definition at line 72 of file nsHttp.h.

#define LOG2_ENABLED ( )    PR_LOG_TEST(gHttpLog, 2)

Definition at line 78 of file nsHttp.h.

#define LOG3 (   args)    PR_LOG(gHttpLog, 3, args)

Definition at line 73 of file nsHttp.h.

#define LOG3_ENABLED ( )    PR_LOG_TEST(gHttpLog, 3)

Definition at line 79 of file nsHttp.h.

#define LOG4 (   args)    PR_LOG(gHttpLog, 4, args)

Definition at line 74 of file nsHttp.h.

#define LOG4_ENABLED ( )    PR_LOG_TEST(gHttpLog, 4)

Definition at line 80 of file nsHttp.h.

Definition at line 81 of file nsHttp.h.

Definition at line 201 of file nsHttp.h.

Definition at line 100 of file nsHttp.h.

Definition at line 101 of file nsHttp.h.

Definition at line 114 of file nsHttp.h.

Definition at line 117 of file nsHttp.h.

Definition at line 86 of file nsHttp.h.

Definition at line 112 of file nsHttp.h.

Definition at line 85 of file nsHttp.h.

Definition at line 84 of file nsHttp.h.

Definition at line 105 of file nsHttp.h.

Definition at line 90 of file nsHttp.h.

Definition at line 91 of file nsHttp.h.

Definition at line 92 of file nsHttp.h.

Definition at line 89 of file nsHttp.h.

Definition at line 115 of file nsHttp.h.

#define QVAL_TO_UINT (   q)    ((unsigned int) ((q + 0.05) * 10.0))

Definition at line 211 of file nsHttp.h.

#define strdup_if (   s)    (s ? nsCRT::strdup(s) : nsnull)

Definition at line 208 of file nsHttp.h.


Typedef Documentation

Definition at line 94 of file nsHttp.h.


Function Documentation

static PRUint32 PRTimeToSeconds ( PRTime  t_usec) [inline, static]

Definition at line 191 of file nsHttp.h.

{
    PRTime usec_per_sec;
    PRUint32 t_sec;
    LL_I2L(usec_per_sec, PR_USEC_PER_SEC);
    LL_DIV(t_usec, t_usec, usec_per_sec);
    LL_L2I(t_sec, t_usec);
    return t_sec;
}