Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
TestStreamTransport.cpp File Reference
#include "TestCommon.h"
#include "nsIComponentRegistrar.h"
#include "nsIStreamTransportService.h"
#include "nsIAsyncInputStream.h"
#include "nsIProgressEventSink.h"
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIProxyObjectManager.h"
#include "nsIRequest.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsCOMPtr.h"
#include "nsMemory.h"
#include "nsString.h"
#include "nsIFileStreams.h"
#include "nsIStreamListener.h"
#include "nsIEventQueueService.h"
#include "nsIEventQueue.h"
#include "nsILocalFile.h"
#include "nsNetUtil.h"
#include "nsAutoLock.h"
#include "prlog.h"
#include "prenv.h"

Go to the source code of this file.

Classes

class  MyCopier

Defines

#define LOG(args)   PR_LOG(gTestLog, PR_LOG_DEBUG, args)
#define CHUNK_SIZE   500

Functions

static NS_DEFINE_CID (kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID)
static NS_DEFINE_CID (kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID)
static void *PR_CALLBACK DoneEvent_Handler (PLEvent *ev)
static void PR_CALLBACK DoneEvent_Cleanup (PLEvent *ev)
static void PostDoneEvent ()
 NS_IMPL_THREADSAFE_ISUPPORTS2 (MyCopier, nsIInputStreamCallback, nsIOutputStreamCallback) static nsresult RunTest(nsIFile *srcFile
 asynchronously copy file.

Variables

PRBool gDone = PR_FALSE
nsIEventQueuegEventQ = nsnull

Define Documentation

#define CHUNK_SIZE   500

Definition at line 111 of file TestStreamTransport.cpp.

#define LOG (   args)    PR_LOG(gTestLog, PR_LOG_DEBUG, args)

Definition at line 70 of file TestStreamTransport.cpp.


Function Documentation

static void PR_CALLBACK DoneEvent_Cleanup ( PLEvent ev) [static]

Definition at line 90 of file TestStreamTransport.cpp.

{
    delete ev;
}

Here is the caller graph for this function:

static void* PR_CALLBACK DoneEvent_Handler ( PLEvent ev) [static]

Definition at line 83 of file TestStreamTransport.cpp.

{
    gDone = PR_TRUE;
    return nsnull;
}

Here is the caller graph for this function:

static NS_DEFINE_CID ( kStreamTransportServiceCID  ,
NS_STREAMTRANSPORTSERVICE_CID   
) [static]

asynchronously copy file.

static void PostDoneEvent ( ) [static]

Definition at line 96 of file TestStreamTransport.cpp.

{
    LOG(("PostDoneEvent\n"));

    PLEvent *ev = new PLEvent();

    PL_InitEvent(ev, nsnull, 
            DoneEvent_Handler,
            DoneEvent_Cleanup);

    gEventQ->PostEvent(ev);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 77 of file TestStreamTransport.cpp.

Definition at line 78 of file TestStreamTransport.cpp.