Public Types | Public Member Functions | Protected Attributes

GenericProtocol Class Reference

Generic protocol handling, hides the parent protocol handling. More...

#include <parent.h>

Inheritance diagram for GenericProtocol:
ParentProtocol AdmissionProtocol ConfigProtocol DiscProtocol FsProtocol LogProtocol TimerProtocol s0_AdmissionProtocol

List of all members.

Public Types

enum  { CAP_PSEUDONYM, CAP_LOCK, CAP_SERVER_SESSION, CAP_SERVER_PT }

Public Member Functions

unsigned call_server (Utcb &utcb, bool drop_frame)
 Call the server in a loop to resolve all faults.
template<class T >
void destroy (Utcb &utcb, unsigned portal_num, T *obj)
 Destroy the object.
void close (Utcb &utcb, unsigned portal_num, bool revoke_lock=true, bool _release_pseudonym=true)
 Close the session to the parent.
unsigned get_notify_sm ()
Utcbinit_frame (Utcb &utcb, unsigned op)
 GenericProtocol (const char *service, unsigned instance, unsigned cap_base, bool blocking)

Protected Attributes

const char * _service
unsigned _instance
unsigned _cap_base
Semaphore _lock
bool _blocking
bool _disabled

Detailed Description

Generic protocol handling, hides the parent protocol handling.

Specific protocols will be inherited from it.

Features: session-open, parent-open, request-portal, optional blocking Missing: restrict-quota


Member Enumeration Documentation

anonymous enum
Enumerator:
CAP_PSEUDONYM 
CAP_LOCK 
CAP_SERVER_SESSION 
CAP_SERVER_PT 

Constructor & Destructor Documentation

GenericProtocol::GenericProtocol ( const char *  service,
unsigned  instance,
unsigned  cap_base,
bool  blocking 
) [inline]

Member Function Documentation

unsigned GenericProtocol::call_server ( Utcb utcb,
bool  drop_frame 
) [inline]

Call the server in a loop to resolve all faults.

void GenericProtocol::close ( Utcb utcb,
unsigned  portal_num,
bool  revoke_lock = true,
bool  _release_pseudonym = true 
) [inline]

Close the session to the parent.

  • Revoke all caps we got from external and we created (default: revoke_lock = true)
  • If revoke_lock == false than this object can be reused afterwards to create another session.
template<class T >
void GenericProtocol::destroy ( Utcb utcb,
unsigned  portal_num,
T *  obj 
) [inline]

Destroy the object.

  • Revoke all caps and add caps back to cap allocator.
unsigned GenericProtocol::get_notify_sm (  )  [inline]
Utcb& GenericProtocol::init_frame ( Utcb utcb,
unsigned  op 
) [inline]

Member Data Documentation

bool GenericProtocol::_blocking [protected]
unsigned GenericProtocol::_cap_base [protected]
bool GenericProtocol::_disabled [protected]
unsigned GenericProtocol::_instance [protected]
const char* GenericProtocol::_service [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines