Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos
Referencia de la Clase QLock

The QLock class is a wrapper for a System V shared semaphore. Más...

#include <qlock_p.h>

Lista de todos los miembros.

Tipos públicos

enum  Type { Read, Write, Read, Write }
enum  Type { Read, Write, Read, Write }

Métodos públicos

 QLock (const QString &filename, char id, bool create=FALSE)
 ~QLock ()
bool isValid () const
void lock (Type type)
void unlock ()
bool locked () const
 QLock (const QString &filename, char id, bool create=FALSE)
 ~QLock ()
bool isValid () const
void lock (Type type)
void unlock ()
bool locked () const

Descripción detallada

The QLock class is a wrapper for a System V shared semaphore.


Documentación de las enumeraciones miembro de la clase

Read Write

Valores de enumeraciones:
Read 
Write 
Read 
Write 
Valores de enumeraciones:
Read 
Write 
Read 
Write 

Documentación del constructor y destructor

QLock::QLock ( const QString filename,
char  id,
bool  create = FALSE 
)

Creates a lock. filename is the file path of the Unix-domain socket the Qt/Embedded client is using. id is the name of the particular lock to be created on that socket. If create is TRUE the lock is to be created (as the Qt/Embedded server does); if create is FALSE the lock should exist already (as the Qt/Embedded client expects).

QLock::~QLock ( )

Destroys a lock

QLock::QLock ( const QString filename,
char  id,
bool  create = FALSE 
)
QLock::~QLock ( )

Documentación de las funciones miembro

bool QLock::isValid ( void  ) const

Returns TRUE if the lock constructor was succesful; returns FALSE if the lock could not be created or was not available to connect to.

bool QLock::isValid ( ) const
void QLock::lock ( Type  t)

Locks the semaphore with a lock of type t. Locks can either be Read or Write. If a lock is Read, attempts by other processes to obtain Read locks will succeed, and Write attempts will block until the lock is unlocked. If locked as Write, all attempts to lock by other processes will block until the lock is unlocked. Locks are stacked: i.e. a given QLock can be locked multiple times by the same process without blocking, and will only be unlocked after a corresponding number of unlock() calls.

void QLock::lock ( Type  type)
bool QLock::locked ( ) const
bool QLock::locked ( ) const

Returns TRUE if the lock is currently held by the current process; otherwise returns FALSE.

void QLock::unlock ( void  )

Unlocks the semaphore. If other processes were blocking waiting to lock() the semaphore, one of them will wake up and succeed in lock()ing.

void QLock::unlock ( )

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'