Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Private Attributes
nsProxyObjectCallInfo Class Reference

import "nsIProxyObjectManager.idl";

Collaboration diagram for nsProxyObjectCallInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsProxyObjectCallInfo (nsProxyObject *owner, nsXPTMethodInfo *methodInfo, PRUint32 methodIndex, nsXPTCVariant *parameterList, PRUint32 parameterCount, PLEvent *event)
 ~nsProxyObjectCallInfo ()
PRUint32 GetMethodIndex () const
nsXPTCVariantGetParameterList () const
PRUint32 GetParameterCount () const
PLEventGetPLEvent () const
nsresult GetResult () const
nsProxyObjectGetProxyObject () const
PRBool GetCompleted ()
void SetCompleted ()
void PostCompleted ()
void SetResult (nsresult rv)
nsIEventQueueGetCallersQueue ()
void SetCallersQueue (nsIEventQueue *queue)
 nsProxyObjectCallInfo (nsProxyObject *owner, nsXPTMethodInfo *methodInfo, PRUint32 methodIndex, nsXPTCVariant *parameterList, PRUint32 parameterCount, PLEvent *event)
 ~nsProxyObjectCallInfo ()
PRUint32 GetMethodIndex () const
nsXPTCVariantGetParameterList () const
PRUint32 GetParameterCount () const
PLEventGetPLEvent () const
nsresult GetResult () const
nsProxyObjectGetProxyObject () const
PRBool GetCompleted ()
void SetCompleted ()
void PostCompleted ()
void SetResult (nsresult rv)
nsIEventQueueGetCallersQueue ()
void SetCallersQueue (nsIEventQueue *queue)

Private Member Functions

void RefCountInInterfacePointers (PRBool addRef)
void CopyStrings (PRBool copy)
void RefCountInInterfacePointers (PRBool addRef)
void CopyStrings (PRBool copy)

Private Attributes

nsresult mResult
nsXPTMethodInfomMethodInfo
PRUint32 mMethodIndex
nsXPTCVariantmParameterList
PRUint32 mParameterCount
PLEventmEvent
PRInt32 mCompleted
nsCOMPtr< nsIEventQueuemCallersEventQ
nsRefPtr< nsProxyObjectmOwner

Detailed Description

Definition at line 135 of file nsIProxyObjectManager.idl.


Constructor & Destructor Documentation

nsProxyObjectCallInfo::nsProxyObjectCallInfo ( nsProxyObject owner,
nsXPTMethodInfo methodInfo,
PRUint32  methodIndex,
nsXPTCVariant parameterList,
PRUint32  parameterCount,
PLEvent event 
)

Definition at line 82 of file nsProxyEvent.cpp.

{
    NS_ASSERTION(owner, "No nsProxyObject!");
    NS_ASSERTION(methodInfo, "No nsXPTMethodInfo!");
    NS_ASSERTION(event, "No PLEvent!");
    
    mCompleted        = 0;
    mMethodIndex      = methodIndex;
    mParameterList    = parameterList;
    mParameterCount   = parameterCount;
    mEvent            = event;
    mMethodInfo       = methodInfo;
    mCallersEventQ    = nsnull;

    mOwner            = owner;
    
    RefCountInInterfacePointers(PR_TRUE);
    if (mOwner->GetProxyType() & PROXY_ASYNC)
        CopyStrings(PR_TRUE);
}

Here is the call graph for this function:

Definition at line 109 of file nsProxyEvent.cpp.

Here is the call graph for this function:

nsProxyObjectCallInfo::nsProxyObjectCallInfo ( nsProxyObject owner,
nsXPTMethodInfo methodInfo,
PRUint32  methodIndex,
nsXPTCVariant parameterList,
PRUint32  parameterCount,
PLEvent event 
)

Member Function Documentation

Definition at line 152 of file nsProxyEvent.cpp.

{
    for (PRUint32 i = 0; i < mParameterCount; i++)
    {
        const nsXPTParamInfo paramInfo = mMethodInfo->GetParam(i);

        if(paramInfo.IsIn())
        {
            const nsXPTType& type = paramInfo.GetType();
            uint8 type_tag = type.TagPart();
            void *ptr = mParameterList[i].val.p;

            if (!ptr)
                continue;

            if (copy)
            {                
                switch (type_tag) 
                {
                    case nsXPTType::T_CHAR_STR:                                
                        mParameterList[i].val.p =
                            PL_strdup((const char *)ptr);
                        break;
                    case nsXPTType::T_WCHAR_STR:
                        mParameterList[i].val.p =
                            nsCRT::strdup((const PRUnichar *)ptr);
                        break;
                    case nsXPTType::T_DOMSTRING:
                    case nsXPTType::T_ASTRING:
                        mParameterList[i].val.p = 
                            new nsString(*((nsAString*) ptr));
                        break;
                    case nsXPTType::T_CSTRING:
                        mParameterList[i].val.p = 
                            new nsCString(*((nsACString*) ptr));
                        break;
                    case nsXPTType::T_UTF8STRING:                        
                        mParameterList[i].val.p = 
                            new nsUTF8String(*((nsAUTF8String*) ptr));
                        break;
                    default:
                        // Other types are ignored
                        break;                    
                }
            }
            else
            {
                switch (type_tag) 
                {
                    case nsXPTType::T_CHAR_STR:
                    case nsXPTType::T_WCHAR_STR:
                        PL_strfree((char*) ptr);
                        break;
                    case nsXPTType::T_DOMSTRING:
                    case nsXPTType::T_ASTRING:
                        delete (nsString*) ptr;
                        break;
                    case nsXPTType::T_CSTRING:
                        delete (nsCString*) ptr;
                        break;
                    case nsXPTType::T_UTF8STRING:
                        delete (nsUTF8String*) ptr;
                        break;
                    default:
                        // Other types are ignored
                        break;
                }
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 259 of file nsProxyEvent.cpp.

{ 
    return mCallersEventQ;
}   

Definition at line 225 of file nsProxyEvent.cpp.

{
    return (PRBool)mCompleted;
}

Here is the caller graph for this function:

Definition at line 147 of file nsProxyEvent.h.

{ return mMethodIndex; }

Definition at line 148 of file nsIProxyObjectManager.idl.

Definition at line 149 of file nsProxyEvent.h.

{ return mParameterCount; }

Definition at line 150 of file nsIProxyObjectManager.idl.

Definition at line 148 of file nsProxyEvent.h.

{ return mParameterList; }

Definition at line 149 of file nsIProxyObjectManager.idl.

Definition at line 150 of file nsProxyEvent.h.

{ return mEvent; }

Definition at line 151 of file nsIProxyObjectManager.idl.

Here is the caller graph for this function:

Definition at line 152 of file nsProxyEvent.h.

{ return mOwner; }

Definition at line 153 of file nsIProxyObjectManager.idl.

Definition at line 151 of file nsProxyEvent.h.

{ return mResult; }

Definition at line 152 of file nsIProxyObjectManager.idl.

Here is the caller graph for this function:

Definition at line 237 of file nsProxyEvent.cpp.

{
    if (mCallersEventQ)
    {
        PLEvent *event = PR_NEW(PLEvent);
    
        PL_InitEvent(event, 
                     this,
                     CompletedEventHandler,
                     CompletedDestroyHandler);
   
        mCallersEventQ->PostSynchronousEvent(event, nsnull);
        PR_FREEIF(event);
    }
    else
    {
        // caller does not have an eventQ? This is an error!
        SetCompleted();
    }
}

Here is the call graph for this function:

Definition at line 124 of file nsProxyEvent.cpp.

{
    for (PRUint32 i = 0; i < mParameterCount; i++)
    {
        nsXPTParamInfo paramInfo = mMethodInfo->GetParam(i);

        if (paramInfo.GetType().IsInterfacePointer() )
        {
            nsISupports* anInterface = nsnull;

            if (paramInfo.IsIn())
            {
                anInterface = ((nsISupports*)mParameterList[i].val.p);
                
                if (anInterface)
                {
                    if(addRef)
                        anInterface->AddRef();
                    else
                        anInterface->Release();
            
                }
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 264 of file nsProxyEvent.cpp.

{
    mCallersEventQ = queue;
}   

Here is the caller graph for this function:

Definition at line 231 of file nsProxyEvent.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 158 of file nsProxyEvent.h.

{mResult = rv; }

Definition at line 159 of file nsIProxyObjectManager.idl.


Member Data Documentation

Definition at line 174 of file nsIProxyObjectManager.idl.

Definition at line 172 of file nsIProxyObjectManager.idl.

Definition at line 171 of file nsIProxyObjectManager.idl.

Definition at line 168 of file nsIProxyObjectManager.idl.

Definition at line 167 of file nsIProxyObjectManager.idl.

Definition at line 178 of file nsIProxyObjectManager.idl.

Definition at line 170 of file nsIProxyObjectManager.idl.

Definition at line 169 of file nsIProxyObjectManager.idl.

Definition at line 166 of file nsIProxyObjectManager.idl.


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