Merge pull request #4324 from FernetMenta/wasapi
[vuplus_xbmc] / lib / UnrarXLib / consio.hpp
1 #ifndef _RAR_CONSIO_
2 #define _RAR_CONSIO_
3
4 enum {ALARM_SOUND,ERROR_SOUND,QUESTION_SOUND};
5
6 enum PASSWORD_TYPE {PASSWORD_GLOBAL,PASSWORD_FILE,PASSWORD_ARCHIVE};
7
8 void InitConsoleOptions(MESSAGE_TYPE MsgStream,bool Sound);
9
10 #ifndef SILENT
11 void mprintf(const char *fmt,...);
12 void eprintf(const char *fmt,...);
13 void Alarm();
14 void GetPasswordText(char *Str,int MaxLength);
15 unsigned int GetKey();
16 bool GetPassword(PASSWORD_TYPE Type,const char *FileName,char *Password,int MaxLength);
17 int Ask(const char *AskStr);
18 #endif
19
20 int KbdAnsi(char *Addr,int Size);
21 void OutComment(char *Comment,int Size);
22
23 #ifdef SILENT
24 #ifdef __GNUC__
25   #define mprintf(args...)
26   #define eprintf(args...)
27 #else
28   inline void mprintf(const char *fmt,const char *a=NULL,const char *b=NULL) {}
29   inline void eprintf(const char *fmt,const char *a=NULL,const char *b=NULL) {}
30   inline void mprintf(const char *fmt,int b) {}
31   inline void eprintf(const char *fmt,int b) {}
32   inline void mprintf(const char *fmt,const char *a,int b) {}
33   inline void eprintf(const char *fmt,const char *a,int b) {}
34 #endif
35 inline void Alarm() {}
36 inline void GetPasswordText(char *Str,int MaxLength) {}
37 inline unsigned int GetKey() {return(0);}
38 inline bool GetPassword(PASSWORD_TYPE Type,const char *FileName,char *Password,int MaxLength) {return(false);}
39 inline int Ask(const char *AskStr) {return(0);}
40 #endif
41
42 #endif