sbRequestItem Class Reference

#include <sbRequestItem.h>

Inheritance diagram for sbRequestItem:
[legend]

Public Member Functions

 NS_IMETHOD_ (nsrefcnt) AddRef(void)
 
 NS_IMETHOD_ (nsrefcnt) Release(void)
 
PRUint32 GetRequestId () const
 
PRUint32 GetType () const
 
void SetType (PRUint32 aType)
 
PRUint32 GetBatchId () const
 
PRUint32 GetBatchIndex () const
 
void SetBatchIndex (PRInt32 aBatchIndex)
 
PRInt64 GetTimeStamp () const
 
bool GetIsCountable () const
 
bool GetIsProcessed () const
 
void SetIsProcessed (bool aIsProcessed)
 

Static Public Member Functions

static sbRequestItemNew (PRUint32 aType, bool aIsCountable=false)
 

Protected Member Functions

 sbRequestItem ()
 
virtual ~sbRequestItem ()
 
void SetIsCountable (bool aIsCountable)
 

Friends

class sbRequestThreadQueue
 

Detailed Description

This provides the basic information for a request. The class does not need to be completely thread safe. Creation is to occur on the thread calling sbIRequestThreadQueue::pushRequest. Further access will only occur on the request thread queue's thread when the request is removed. The object does use the thread safe addref/release to prevent warnings in XPCOM since the object is created on one thread and used on another.

Definition at line 44 of file sbRequestItem.h.

Constructor & Destructor Documentation

sbRequestItem::sbRequestItem ( )
protected

Initializes the request type and defaults for data members.

Definition at line 39 of file sbRequestItem.cpp.

sbRequestItem::~sbRequestItem ( )
protectedvirtual

Definition at line 50 of file sbRequestItem.cpp.

Member Function Documentation

PRUint32 sbRequestItem::GetBatchId ( ) const
inline

Returns the batch ID of the item

Definition at line 81 of file sbRequestItem.h.

Here is the caller graph for this function:

PRUint32 sbRequestItem::GetBatchIndex ( ) const
inline

Returns index of the item within the batch. This is for counting purposes and so is the logical location not the physical location.

Definition at line 90 of file sbRequestItem.h.

Here is the caller graph for this function:

bool sbRequestItem::GetIsCountable ( ) const
inline

Returns whether this item is countable

Definition at line 115 of file sbRequestItem.h.

Here is the caller graph for this function:

bool sbRequestItem::GetIsProcessed ( ) const
inline

Returns the is processed flag which denotes whether the request as successfully processed.

Definition at line 124 of file sbRequestItem.h.

PRUint32 sbRequestItem::GetRequestId ( ) const
inline

Returns the unique Id of the request

Definition at line 56 of file sbRequestItem.h.

PRInt64 sbRequestItem::GetTimeStamp ( ) const
inline

Returns the timestamp that this item was created

Definition at line 107 of file sbRequestItem.h.

PRUint32 sbRequestItem::GetType ( ) const
inline

Returns the type of the request. This type is defined by the derived classes.

Definition at line 65 of file sbRequestItem.h.

Here is the caller graph for this function:

static sbRequestItem* sbRequestItem::New ( PRUint32  aType,
bool  aIsCountable = false 
)
inlinestatic

Definition at line 137 of file sbRequestItem.h.

Here is the call graph for this function:

Here is the caller graph for this function:

sbRequestItem::NS_IMETHOD_ ( nsrefcnt  )
sbRequestItem::NS_IMETHOD_ ( nsrefcnt  )
void sbRequestItem::SetBatchIndex ( PRInt32  aBatchIndex)
inline

Sets the batch index for this item.

Definition at line 98 of file sbRequestItem.h.

Here is the caller graph for this function:

void sbRequestItem::SetIsCountable ( bool  aIsCountable)
inlineprotected

Sets the flag determining if the request is countable

Definition at line 160 of file sbRequestItem.h.

Here is the caller graph for this function:

void sbRequestItem::SetIsProcessed ( bool  aIsProcessed)
inline

Sets state of the processed flag

Definition at line 132 of file sbRequestItem.h.

void sbRequestItem::SetType ( PRUint32  aType)
inline

Sets the type of the request

Definition at line 73 of file sbRequestItem.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class sbRequestThreadQueue
friend

Definition at line 48 of file sbRequestItem.h.


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