/*---------------------------------------------------------------------------*/
/* media_tones.h                                                             */
/* copyright (c) innovaphone 2015                                            */
/*                                                                           */
/*---------------------------------------------------------------------------*/

#define MEDIA_TONES_DIALING         0
#define MEDIA_TONES_DIALING_SPECIAL 1
#define MEDIA_TONES_CALLING         2
#define MEDIA_TONES_RINGBACK        3
#define MEDIA_TONES_BUSY            4
#define MEDIA_TONES_HOLDING         5
#define MEDIA_TONES_FAST_BUSY       6
#define MEDIA_TONES_CALLWAITING     7
#define MEDIA_TONES_HOLDING_CISCO   8
#define MEDIA_TONES_ZIPZIP          9
#define MEDIA_TONES_INTRUSION       10
#define MEDIA_TONES_CONFERENCE      11
#define MEDIA_TONES_CONFIRM         12

#define MEDIA_TONES_EUROPE_PBX      0
#define MEDIA_TONES_EUROPE_PUBLIC   1
#define MEDIA_TONES_US              2
#define MEDIA_TONES_UK              3
#define MEDIA_TONES_ITALY_PBX       4
#define MEDIA_TONES_ITALY_PUBLIC    5
#define MEDIA_TONES_CZECH_PBX       6
#define MEDIA_TONES_CZECH_PUBLIC    7
#define MEDIA_TONES_SWEDEN          8
#define MEDIA_TONES_FRANCE          9
#define MEDIA_TONES_SWISS           10
#define MEDIA_TONES_BELGIUM         11
#define MEDIA_TONES_NETHERLANDS     12
#define MEDIA_TONES_NORWAY          13
#define MEDIA_TONES_DENMARK         14
#define MEDIA_TONES_GERMANY         15
#define MEDIA_TONES_SPAIN           16
#define MEDIA_TONES_FINLAND         17
#define MEDIA_TONES_AUSTRIA         18
#define MEDIA_TONES_IRELAND         19
#define MEDIA_TONES_AUSTRALIA       20
#define MEDIA_TONES_NEWZEALAND      21
#define MEDIA_TONES_MALAYSIA        22
#define MEDIA_TONES_TURKEY          23
#define MEDIA_TONES_RUSSIA          24
#define MEDIA_TONES_SOUTH_AFRICA    25
#define MEDIA_TONES_BRAZIL          26

class MediaTones {
public:
    static void StopTone(class IAudioIo *audioIo);
    static unsigned PrepareTone(int toneId, int countryId, dword *flags, struct AudioIoDualTone *tones);
    static void StartTone(int toneId, int countryId, class IAudioIo *audioIo);
    static unsigned PrepareToneMsg(const char *toneName, const char *countryName, dword *flags, struct AudioIoDualTone *tones);
    static void StartToneMsg(const char *toneName, const char *countryName, class IAudioIo *audioIo);
    static unsigned PrepareDtmf(char digit, struct AudioIoDualTone *tones);
    static void StartDtmf(char digit, bool feedback, class IAudioIo *audioIo);
};
