Public Types | Signals | Public Member Functions | Protected Member Functions

MeeGo::QmLocks Class Reference

Provides information and actions on device locks. More...

#include <qmlocks.h>

List of all members.

Public Types

enum  Lock { Device = 0, TouchAndKeyboard }
enum  State { Unlocked = 0, Locked, Unknown }

Signals

void stateChanged (MeeGo::QmLocks::Lock what, MeeGo::QmLocks::State how)

Public Member Functions

 QmLocks (QObject *parent=0)
 ~QmLocks ()
QmLocks::State getState (QmLocks::Lock what) const
QmLocks::State getStateAsync (QmLocks::Lock what) const
bool setState (QmLocks::Lock what, QmLocks::State how)
bool setDeviceAutolockTime (int seconds)
int getDeviceAutolockTime ()

Protected Member Functions

void connectNotify (const char *signal)
void disconnectNotify (const char *signal)

Detailed Description

Provides information and actions on device locks.

Scope:
Nokia Meego

Definition at line 49 of file qmlocks.h.


Member Enumeration Documentation

Things that can be locked.

Enumerator:
Device 

Device lock.

Deprecated:
The device lock functionality is deprecated. Please use the devicelock interface.
TouchAndKeyboard 

Touchscreen/keypad lock

Definition at line 57 of file qmlocks.h.

Lock states

Enumerator:
Unlocked 

Unlocked

Locked 

Locked

Unknown 

Unknown

Definition at line 71 of file qmlocks.h.


Constructor & Destructor Documentation

MeeGo::QmLocks::QmLocks ( QObject *  parent = 0  ) 
MeeGo::QmLocks::~QmLocks (  ) 

Member Function Documentation

void MeeGo::QmLocks::connectNotify ( const char *  signal  )  [protected]
void MeeGo::QmLocks::disconnectNotify ( const char *  signal  )  [protected]
int MeeGo::QmLocks::getDeviceAutolockTime (  ) 

Gets the device autolock timeout.

State:
Deprecated
Returns:
Timeout in seconds, value 0 means that autolock is not acticated, -1 is error
QmLocks::State MeeGo::QmLocks::getState ( QmLocks::Lock  what  )  const

Gets the current lock state. Note: the method blocks until the lock state has been retrieved. For a non-blocking query, please see getStateAsync().

Parameters:
what Which lock state to request
Returns:
Current lock state for what
QmLocks::State MeeGo::QmLocks::getStateAsync ( QmLocks::Lock  what  )  const

Gets the current lock state. The method is non-blocking, so it initially returns the lock state QmLocks::Unknown. When the lock state has been retrieved, the stateChanged signal is emitted.

Parameters:
what Which lock state to request
Returns:
Current lock state for what
bool MeeGo::QmLocks::setDeviceAutolockTime ( int  seconds  ) 

Sets the device autolock timeout. Device is automatically locked after the specified amount of inactivity.

Credential:
mce::DeviceLockControl Resource token required to set the device lock timeout.
State:
Deprecated
Parameters:
seconds Number of seconds of inactivity after which the device is automatically locked. Value <=0 disables autolock.
Returns:
True on success, false otherwise
bool MeeGo::QmLocks::setState ( QmLocks::Lock  what,
QmLocks::State  how 
)

Sets the current lock state. Note that this interface does not allow to unlock device.

Credential:
mce::TKLockControl Resource token required to set the touchscreen/keypad lock state.
Parameters:
what Which lock state to set
how Set to which state
Returns:
True if the lock state was requested, false otherwise
void MeeGo::QmLocks::stateChanged ( MeeGo::QmLocks::Lock  what,
MeeGo::QmLocks::State  how 
) [signal]

Sent when some device lock state has changed.

Parameters:
what Which lock state was changed
how Which state the lock was changed to

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