/****************************************************************************** |* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF |* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |* PARTICULAR PURPOSE. |* |* Copyright 1995-2005 Nero AG. All Rights Reserved. |*----------------------------------------------------------------------------- |* NeroSDK / NeroRobo |* |* PROGRAM: AbstractConfigurationStorage.h |* |* PURPOSE: Interface for saving/query robot configuration settings ******************************************************************************/ /* This file describes an abstract interface to some settings management facility for external * modules. It is currently used by the robo driver. */ #ifndef ABSTRACTCONFIGURATIONSTORAGE_H #define ABSTRACTCONFIGURATIONSTORAGE_H #include /* Implement this interface if you want to stay uptodate about your configuration informations * and also to make your dialog dynamic */ class IUserDialogWatchdog { public: virtual void ValueChanged(const char *szName) = 0; }; /* NOTE: current Nero implementation of IUserDialogFactory, which derives IConfigurationStorage to save * configuration data in registry, uses unique robo driver ID as key, which consists of port type ID * the robo is connected to, port number, SCSI adapter host ID of recorder the driver ist assigned to, * SCSI target ID of the same recorder and the robo name. This is in case, there are multiple recorders on * system with the same name. * If we have only one recorder or multiple, different recorder names the implementation of IConfigurationStorage * in Nero will use this recorder name to create registry key for configuration storage. */ class IConfigurationStorage { public: /* Register watchdog handler, which should receive value change notifications */ virtual void InstallWatchdog(IUserDialogWatchdog *pDialogWatchdog) = 0; /* This method should be called if value change notifications should not be received anymore. */ virtual void UninstallWatchdog(IUserDialogWatchdog *pDialogWatchdog) = 0; /* Will be called by the appropriate UI, if some named values changed, to inform all * watch dogs. */ virtual void SendNotification(const char *szName) const = 0; /* Get different configuration value types (string, bool, int). If there is not appropriate * value already set, the default value will be returned. */ virtual const char *GetConfigurationValue(const char *szName, const char *szDefault) = 0; virtual BOOL GetConfigurationValueBOOL(const char *szName, BOOL bDefault) = 0; virtual int GetConfigurationValueINT(const char *szName, int iDefault ) = 0; /* Set different configuration value types (string, bool, int). */ virtual void SetConfigurationValue(const char *szName, const char *szValue) = 0; virtual void SetConfigurationValueBOOL(const char *szName, BOOL bValue) = 0; virtual void SetConfigurationValueINT(const char *szName, int iValue) = 0; }; #endif // ABSTRACTCONFIGURATIONSTORAGE