TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
A class to encapsulate the access to the Windows registry. More...
#include <tsRegistry.h>
Public Types | |
using | Handle = system-specific |
Handle to a registry key. | |
Static Public Member Functions | |
static bool | CreateKey (const UString &key, bool is_volatile=false, Report &report=(ts::NullReport::Instance())) |
Create a registry key. | |
static bool | DeleteKey (const UString &key, Report &report=(ts::NullReport::Instance())) |
Delete a registry key. | |
static bool | DeleteValue (const UString &key, const UString &value_name, Report &report=(ts::NullReport::Instance())) |
Delete a value of a registry key. | |
static UString | GetValue (const UString &key, const UString &value_name=UString(), Report &report=(ts::NullReport::Instance())) |
Get a value in a registry key as a string. | |
static bool | NotifyEnvironmentChange (Report &report=(ts::NullReport::Instance())) |
Notify all applications that the environment was modified. | |
static bool | NotifySettingChange (Report &report=(ts::NullReport::Instance())) |
Notify all applications of a setting change. | |
static bool | SetValue (const UString &key, const UString &value_name, const UString &value, bool expandable=false, Report &report=(ts::NullReport::Instance())) |
Set the value of a registry key. | |
static bool | SetValue (const UString &key, const UString &value_name, uint32_t value, Report &report=(ts::NullReport::Instance())) |
Set value of a registry key. | |
static bool | SplitKey (const UString &key, Handle &root_key, UString &midkey, UString &final_key, Report &report=(ts::NullReport::Instance())) |
Get the root key of a registry path. | |
static bool | SplitKey (const UString &key, Handle &root_key, UString &subkey, Report &report=(ts::NullReport::Instance())) |
Get the root key of a registry path. | |
Static Public Attributes | |
static const UString | SystemEnvironmentKey |
Name of the registry key containining the system-defined environment variables. | |
static const UString | UserEnvironmentKey |
Name of the registry key containining the user-defined environment variables. | |
A class to encapsulate the access to the Windows registry.
Vocabulary :
This class is defined for all operating systems. So, it is possible to use it everywhere without complicated conditional compilation. However, all calls return an error on non-Windows systems.
|
static |
Get a value in a registry key as a string.
[in] | key | Registry key. |
[in] | value_name | Name of the value in key. |
[in,out] | report | Where to report error. |
|
static |
Set the value of a registry key.
[in] | key | Registry key. |
[in] | value_name | Name of the value in key. |
[in] | value | Value to set in value_name. |
[in] | expandable | If true, set the type to REG_EXPAND_SZ. Otherwise, set type to REG_SZ. |
[in,out] | report | Where to report error. |
|
static |
Set value of a registry key.
Set the data type as REG_DWORD.
[in] | key | Registry key. |
[in] | value_name | Name of the value in key. |
[in] | value | Value to set in value_name. Set the data type as REG_DWORD. |
[in,out] | report | Where to report error. |
|
static |
Delete a value of a registry key.
[in] | key | Registry key. |
[in] | value_name | Name of the value in key. |
[in,out] | report | Where to report error. |
|
static |
Create a registry key.
[in] | key | Registry key to create. |
[in] | is_volatile | If true, create a "volatile" registry key. |
[in,out] | report | Where to report error. |
|
static |
Delete a registry key.
[in] | key | Registry key to delete. |
[in,out] | report | Where to report error. |
|
static |
Get the root key of a registry path.
[in] | key | Registry key to split. |
[out] | root_key | Handle to the root key. |
[out] | subkey | Subkey name. |
[in,out] | report | Where to report error. |
|
static |
Get the root key of a registry path.
[in] | key | Registry key to split. |
[out] | root_key | Handle to the root key. |
[out] | midkey | Middle key name (without root key and final component). |
[out] | final_key | Final component of the key. |
[in,out] | report | Where to report error. |
|
static |
Notify all applications of a setting change.
[in,out] | report | Where to report error. |
|
static |
Notify all applications that the environment was modified.
[in,out] | report | Where to report error. |