/*
 * cdda_conf.h: The configuration parameter storage
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id: cdda_conf.h,v 1.1.1.4 2005/06/27 13:34:02 cm Exp $
 */

#ifndef __CDDACONF_H
#define __CDDACONF_H

enum eCddbPriority { cpOff = 0, cpNoCdText, cpAlways};

enum eDisplayInformationView { ivTrack = 0, ivAll };

class cCddaConfiguration {
  private:
    char *p_device;
    char *p_cddbDirectory;
    int skipSeconds;
    int skipBackMargin;
    bool menuEntry;
    bool audioOnly;
    bool autoReplay;
    bool cddbCache;
    char cddbServerFqdn[33];
    unsigned int cddbServerPort;
    eCddbPriority cddbPriority;
    eDisplayInformationView infoView;
  public:
    cCddaConfiguration();
    ~cCddaConfiguration();
    const char *GetDevice(void) { return p_device; };
    const char *SetDevice(const char *name);
    const char *GetCddbDir(void) { return p_cddbDirectory; };
    const char *SetCddbDir(const char *dir);
    int SetSkipSeconds(int seconds);
    int GetSkipSeconds(void) { return skipSeconds; };
    int SetSkipBackMargin(int seconds);
    int GetSkipBackMargin(void) {return skipBackMargin; };
    bool SetAudioOnly(bool on);
    bool isAudioOnly(void) { return audioOnly; };
    bool SetMenuEntry(bool on);
    bool allowMenuEntry(void) { return menuEntry; };
    bool SetAutoReplay(bool on);
    bool isAutoReplay(void) { return autoReplay; };
    eCddbPriority SetCddbPriority(eCddbPriority priority);
    eCddbPriority GetCddbPriority(void) { return cddbPriority; };
    const char *SetCddbServerFqdn(const char *fqdn);
    char *GetCddbServerFqdn(void) { return cddbServerFqdn; };
    int SetCddbServerPort(unsigned int port);
    int GetCddbServerPort(void) { return cddbServerPort; };
    bool SetCddbCache(bool on);
    bool allowCddbCache(void) { return cddbCache; };
    eDisplayInformationView SetDisplayInfoView(eDisplayInformationView view);
    eDisplayInformationView GetDisplayInfoView(void) { return infoView; };
};

#endif
