BProcess::ComponentImage Class Reference

#include <support/Process.h>

Inheritance diagram for BProcess::ComponentImage:

BSharedObject SAtom List of all members.

Public Member Functions

 ComponentImage (const SValue &file, const SPackage &package, bool fake, attach_func attach)
int32_t DecPending ()
status_t InitCheck () const
sptr< IBinderInstantiateComponent (const SString &component, const SContext &context, const SValue &args) const
void MakeExpunged ()

Protected Member Functions

virtual status_t FinishAtom (const void *id)
 Objects can optionally override this function to extend the lifetime of an atom (past the last strong reference).
virtual status_t IncStrongAttempted (uint32_t flags, const void *id)
 Called during IncStrong() after an atom has been released.
virtual void InitAtom ()
 Called the first time a strong reference is acquired. All significant object initialization should go here.
virtual ~ComponentImage ()

Constructor & Destructor Documentation

ComponentImage const SValue file,
const SPackage package,
bool  fake,
attach_func  attach
[inline]
 

virtual ~ComponentImage  )  [inline, protected, virtual]
 


Member Function Documentation

int32_t DecPending  )  [inline]
 

status_t FinishAtom const void *  id  )  [protected, virtual]
 

Objects can optionally override this function to extend the lifetime of an atom (past the last strong reference).

If you return FINISH_ATOM_ASYNC here, your object's destructor will be called asynchronously from the current thread. This is highly recommend if you must acquire a lock in the destructor, to avoid unexpected deadlocks due to things like sptr<> going out of scope while a lock is held.

If you return an error code here, the object's destructor will not be called at this point.

The default implementation will return B_OK, allowing the SAtom destruction to proceed as normal. Don't override this method unless you want some other behavior. Like InitAtom(), you do not need to call the SAtom implementation.

See also:
DecStrong()

Reimplemented from SAtom.

status_t IncStrongAttempted uint32_t  flags,
const void *  id
[protected, virtual]
 

Called during IncStrong() after an atom has been released.

The flags will be B_ATOM_FIRST_STRONG if this is the first strong reference ever acquired on the atom. The default implementation returns B_OK if B_ATOM_FIRST_STRONG is set, otherwise it returns B_NOT_ALLOWED to make the attempted IncStrong() fail.

You can override this to return B_OK when you would like an atom to continue allowing primary references. Note that this also requires overriding FinishAtom() to return an error code, extending the lifetime of the object. Like FinishAtom(), you do not need to call the SAtom implementation.

See also:
AttemptIncStrong(), FinishAtom()

Reimplemented from SAtom.

void InitAtom  )  [protected, virtual]
 

Called the first time a strong reference is acquired. All significant object initialization should go here.

You can override it and do any setup you need. Note that you do not need to call the SAtom implementation. (So you can derive from two different SAtom implementations and safely call down to both of their IncStrong() methods.)

See also:
IncStrong()

Reimplemented from BSharedObject.

status_t InitCheck  )  const [inline]
 

sptr< IBinder > InstantiateComponent const SString component,
const SContext context,
const SValue args
const [inline]
 

void MakeExpunged  )  [inline]
 


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