Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

OmniEvents::RegistryKey Class Reference

Opens a windows registry key, and closed it upon destruction. More...

List of all members.

Public Member Functions

 RegistryKey (RegistryKey &right)
 Copy constructor, adopts ownership.
 RegistryKey (HKEY hkey, const char *subkey, REGSAM samDesired=KEY_QUERY_VALUE)
 Constructor, opens the key.
 ~RegistryKey ()
 Destructor, closes the key.
 operator bool () const
int setValueStr (const char *name, const char *data)
char * queryValueStr (const char *name, const int maxlen=2048) const

Private Member Functions

 RegistryKey ()
 No implementation.
 RegistryKey (HKEY hkey, bool open=true)

Private Attributes

HKEY _hkey
bool _open


Detailed Description

Opens a windows registry key, and closed it upon destruction.

Upon failure, it emits an error message and then quits. Why do I have to write this class myself??

Definition at line 86 of file daemon_windows.cc.


Constructor & Destructor Documentation

OmniEvents::RegistryKey::RegistryKey  )  [private]
 

No implementation.

OmniEvents::RegistryKey::RegistryKey HKEY  hkey,
bool  open = true
[inline, private]
 

Definition at line 92 of file daemon_windows.cc.

OmniEvents::RegistryKey::RegistryKey RegistryKey right  ) 
 

Copy constructor, adopts ownership.

Definition at line 103 of file daemon_windows.cc.

References _open.

OmniEvents::RegistryKey::RegistryKey HKEY  hkey,
const char *  subkey,
REGSAM  samDesired = KEY_QUERY_VALUE
 

Constructor, opens the key.

Definition at line 110 of file daemon_windows.cc.

References _hkey, and _open.

OmniEvents::RegistryKey::~RegistryKey  ) 
 

Destructor, closes the key.

Definition at line 123 of file daemon_windows.cc.

References _hkey, _open, HERE, and OmniEvents::Win::perror().


Member Function Documentation

OmniEvents::RegistryKey::operator bool  )  const [inline]
 

Definition at line 97 of file daemon_windows.cc.

References _open.

char * OmniEvents::RegistryKey::queryValueStr const char *  name,
const int  maxlen = 2048
const
 

Definition at line 150 of file daemon_windows.cc.

References _hkey.

Referenced by OmniEvents::Service::readParameters().

int OmniEvents::RegistryKey::setValueStr const char *  name,
const char *  data
 

Definition at line 136 of file daemon_windows.cc.

References _hkey.

Referenced by OmniEvents::Service::install(), and OmniEvents::Service::writeParameters().


Member Data Documentation

HKEY OmniEvents::RegistryKey::_hkey [private]
 

Definition at line 88 of file daemon_windows.cc.

Referenced by queryValueStr(), RegistryKey(), setValueStr(), and ~RegistryKey().

bool OmniEvents::RegistryKey::_open [private]
 

Definition at line 89 of file daemon_windows.cc.

Referenced by operator bool(), RegistryKey(), and ~RegistryKey().


The documentation for this class was generated from the following file:
Generated on Fri Aug 26 20:56:16 2005 for OmniEvents by  doxygen 1.4.3-20050530