chromium/third_party/unrar/src/ui.hpp

#ifndef _RAR_UI_
#define _RAR_UI_

// UIERROR_ - error message;
// UIMSG_   - informational message;
// UIWAIT_  - message waiting for user confirmation;
// UIEVENT_ - if simple message is not enough;

enum UIMESSAGE_CODE {};

// Flags for uiAskReplace function.
enum UIASKREP_FLAGS {};

// Codes returned by uiAskReplace. Note that uiAskReplaceEx returns only
// UIASKREP_R_REPLACE, UIASKREP_R_SKIP and UIASKREP_R_CANCEL codes.
enum UIASKREP_RESULT {};

UIASKREP_RESULT uiAskReplace(std::wstring &Name,int64 FileSize,RarTime *FileTime,uint Flags);
UIASKREP_RESULT uiAskReplaceEx(CommandData *Cmd,std::wstring &Name,int64 FileSize,RarTime *FileTime,uint Flags);

void uiInit(SOUND_NOTIFY_MODE Sound);


void uiStartArchiveExtract(bool Extract,const std::wstring &ArcName);
bool uiStartFileExtract(const std::wstring &FileName,bool Extract,bool Test,bool Skip);
void uiExtractProgress(int64 CurFileSize,int64 TotalFileSize,int64 CurSize,int64 TotalSize);
void uiProcessProgress(const char *Command,int64 CurSize,int64 TotalSize);

enum UIPASSWORD_TYPE
{};

bool uiGetPassword(UIPASSWORD_TYPE Type,const std::wstring &FileName,SecPassword *Password,CheckPassword *CheckPwd);
bool uiIsGlobalPasswordSet();

enum UIALARM_TYPE {};
void uiAlarm(UIALARM_TYPE Type);

void uiEolAfterMsg();

bool uiAskNextVolume(std::wstring &VolName);
#if !defined(SILENT) && !defined(SFX_MODULE)
void uiAskRepeatRead(const std::wstring &FileName,bool &Ignore,bool &All,bool &Retry,bool &Quit);
#endif
bool uiAskRepeatWrite(const std::wstring &FileName,bool DiskFull);

bool uiDictLimit(CommandData *Cmd,const std::wstring &FileName,uint64 DictSize,uint64 MaxDictSize);

#ifndef SFX_MODULE
const wchar *uiGetMonthName(uint Month);
#endif

class uiMsgStore
{};


inline void uiMsgBase(uiMsgStore &Store)
{}

template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
{}


// Use variadic templates.
//
// We must pass variable parameters by reference, so no temporary copies are
// created for custom string objects like CStringBase in 7-Zip decompression
// code. Such temporary copies would be destroyed inside of recursive
// uiMsgBase calls, leaving us with Str[] items pointing at released memory.
// Since we pass integer values as well, we can't use & references
// and must resort to && rvalue references.
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
{}

#endif