#include <sbThreadUtils.h>
|
static nsresult | New (SelfType **aRunnable, ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value, Arg2Type aArg2Value) |
|
static ReturnType | InvokeOnMainThread (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value, Arg2Type aArg2Value) |
|
static ReturnType | InvokeOnThread (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value, Arg2Type aArg2Value, nsIEventTarget *aThread) |
|
static nsresult | InvokeOnMainThreadAsync (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value, Arg2Type aArg2Value) |
|
static nsresult | InvokeOnThreadAsync (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value, Arg2Type aArg2Value, nsIEventTarget *aThread) |
|
static nsresult | New (SelfType **aRunnable, ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value) |
|
static ReturnType | InvokeOnMainThread (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value) |
|
static ReturnType | InvokeOnThread (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value, nsIEventTarget *aThread) |
|
static nsresult | InvokeOnMainThreadAsync (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value) |
|
static nsresult | InvokeOnThreadAsync (ClassType *aObject, MethodType aMethod, ReturnType aFailureReturnValue, Arg1Type aArg1Value, nsIEventTarget *aThread) |
|
template<class ClassType, typename ReturnType, typename Arg1Type, typename Arg2Type>
class sbRunnableMethod2< ClassType, ReturnType, Arg1Type, Arg2Type >
This class is a two argument method sub-class of sbRunnableMethod1.
Definition at line 420 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
typedef ReturnType(ClassType::* sbRunnableMethod2< ClassType, ReturnType, Arg1Type, Arg2Type >::MethodType)(Arg1Type aArg1Value, Arg2Type aArg2Value) |
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
Construct a Songbird runnable method for the object specified by aObject. Call the object method specified by aMethod with the argument specified by aArg1Value. Use the value specified by aFailureReturnValue as the failure return value.
- Parameters
-
aObject | Object for which to create a Songbird runnable method. |
aMethod | Method to be invoked. |
aFailureReturnValue | Value to which to set runnable method return value on internal failures. |
aArg1Value | Value of first method argument. |
Definition at line 703 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
static ReturnType sbRunnableMethod2< ClassType, ReturnType, Arg1Type, Arg2Type >::InvokeOnMainThread |
( |
ClassType * |
aObject, |
|
|
MethodType |
aMethod, |
|
|
ReturnType |
aFailureReturnValue, |
|
|
Arg1Type |
aArg1Value, |
|
|
Arg2Type |
aArg2Value |
|
) |
| |
|
inlinestatic |
Invoke the method specified by aMethod of the object specified by aObject on the main thread. Invoke the method with the arguments specified by aArg1Value and aArg2Value. Return the value returned by the invoked method. If any error occurs, return aFailureReturnValue.
- Parameters
-
aObject | Object for which to invoke method. |
aMethod | Method to invoke. |
aFailureReturnValue | Value to return on failure. |
aArg1Value | Value of first method argument. |
aArg2Value | Value of second method argument. |
- Returns
- Value returned by invoked method or aFailureReturnValue on failure.
Definition at line 533 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
static nsresult sbRunnableMethod2< ClassType, ReturnType, Arg1Type, Arg2Type >::InvokeOnMainThreadAsync |
( |
ClassType * |
aObject, |
|
|
MethodType |
aMethod, |
|
|
ReturnType |
aFailureReturnValue, |
|
|
Arg1Type |
aArg1Value, |
|
|
Arg2Type |
aArg2Value |
|
) |
| |
|
inlinestatic |
Asynchronously, invoke the method specified by aMethod of the object specified by aObject on the main thread. Invoke the method with the arguments specified by aArg1Value and aArg2Value. Use the value specified by aFailureReturnValue as the runnable method failure return value. XXXeps the return value is only needed to properly create the object.
- Parameters
-
aObject | Object for which to invoke method. |
aMethod | Method to invoke. |
aFailureReturnValue | Value to return on failure. |
aArg1Value | Value of first method argument. |
aArg2Value | Value of second method argument. |
Definition at line 615 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
static ReturnType sbRunnableMethod2< ClassType, ReturnType, Arg1Type, Arg2Type >::InvokeOnThread |
( |
ClassType * |
aObject, |
|
|
MethodType |
aMethod, |
|
|
ReturnType |
aFailureReturnValue, |
|
|
Arg1Type |
aArg1Value, |
|
|
Arg2Type |
aArg2Value, |
|
|
nsIEventTarget * |
aThread |
|
) |
| |
|
inlinestatic |
Invoke the method specified by aMethod of the object specified by aObject on the supplied thread. Invoke the method with the arguments specified by aArg1Value and aArg2Value. Return the value returned by the invoked method. If any error occurs, return aFailureReturnValue.
- Parameters
-
aObject | Object for which to invoke method. |
aMethod | Method to invoke. |
aFailureReturnValue | Value to return on failure. |
aArg1Value | Value of first method argument. |
aArg2Value | Value of second method argument. |
aThread | Thread to run on. |
- Returns
- Value returned by invoked method or aFailureReturnValue on failure.
Definition at line 575 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
static nsresult sbRunnableMethod2< ClassType, ReturnType, Arg1Type, Arg2Type >::InvokeOnThreadAsync |
( |
ClassType * |
aObject, |
|
|
MethodType |
aMethod, |
|
|
ReturnType |
aFailureReturnValue, |
|
|
Arg1Type |
aArg1Value, |
|
|
Arg2Type |
aArg2Value, |
|
|
nsIEventTarget * |
aThread |
|
) |
| |
|
inlinestatic |
Asynchronously, invoke the method specified by aMethod of the object specified by aObject on the main thread. Invoke the method with the arguments specified by aArg1Value and aArg2Value. Use the value specified by aFailureReturnValue as the runnable method failure return value. XXXeps the return value is only needed to properly create the object.
- Parameters
-
aObject | Object for which to invoke method. |
aMethod | Method to invoke. |
aFailureReturnValue | Value to return on failure. |
aArg1Value | Value of first method argument. |
aArg2Value | Value of second method argument. |
aThread | Thread to run on. |
Definition at line 655 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
static nsresult sbRunnableMethod2< ClassType, ReturnType, Arg1Type, Arg2Type >::New |
( |
SelfType ** |
aRunnable, |
|
|
ClassType * |
aObject, |
|
|
MethodType |
aMethod, |
|
|
ReturnType |
aFailureReturnValue, |
|
|
Arg1Type |
aArg1Value, |
|
|
Arg2Type |
aArg2Value |
|
) |
| |
|
inlinestatic |
Create and initialize a Songbird runnable method for the object specified by aObject. Call the object method specified by aMethod with the arguments specified by aArg1Value and aArg2Value. Use the value specified by aFailureReturnValue as the failure return value. Return the new Songbird runnable method in aRunnable.
- Parameters
-
aRunnable | Returned created Songbird runnable method. |
aObject | Object for which to create a Songbird runnable method. |
aMethod | Method to be invoked. |
aFailureReturnValue | Value to which to set runnable method return value on internal failures. |
aArg1Value | Value of first method argument. |
aArg2Value | Value of second method argument. |
Definition at line 483 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
nsIRunnable run method. Invoke the Songbird runnable method.
Definition at line 447 of file sbThreadUtils.h.
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
template<class ClassType , typename ReturnType , typename Arg1Type , typename Arg2Type >
The documentation for this class was generated from the following file:
- /home/martin/dev/nightingale-hacking/components/moz/threads/src/sbThreadUtils.h