home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1999 October
/
VPR9910A.BIN
/
OLS
/
unrar32005
/
unrar32005.lzh
/
src
/
rar.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-03-23
|
2KB
|
81 lines
/*
* Copyright (c) 1998 T. Kamei (kamei@jsdlab.co.jp)
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for any purpose is hereby granted provided
* that the above copyright notice and this permission notice appear
* in all copies of the software and related documentation.
*
* NO WARRANTY
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY WARRANTIES;
* WITHOUT EVEN THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
* FOR A PARTICULAR PURPOSE.
*/
#ifndef _rar_h_
# define _rar_h_
class UnRAR
{
public:
enum unrar_update_type
{UT_ASK, UT_OVWRT, UT_SKIP, UT_NEWER, UT_EXISTING};
enum unrar_cmd
{
C_NOTDEF,
C_EXTRACT,
C_EXTRACT_NODIR,
C_TEST,
C_PRINT,
C_LIST,
C_VLIST,
C_COMMENT
};
enum unrar_opt
{
O_RECURSIVE = 1,
O_YES = 2,
O_VOLUME = 4,
O_STRICT = 8
};
private:
unrar_cmd u_cmd;
unrar_update_type u_type;
int u_opt;
const char *u_path;
const char *u_dest;
const char *u_passwd;
HWND u_hwnd;
ostrbuf &u_ostr;
glob u_glob;
int mkdirhier (const char *);
int check_timestamp (const char *, const RARHeaderData &);
int parse_opt (int, char **);
int extract (rarData &, const char *, const RARHeaderData &,
const class progress_dlg &);
int extract ();
int print ();
int list ();
int test ();
int comment ();
int format (const char *, ...) const;
int format (int, ...) const;
int open_err (int) const;
int header_err (int) const;
int process_err (int, const char *) const;
public:
int xmain (int, char **);
UnRAR (HWND hwnd, ostrbuf &ostr) : u_hwnd (hwnd), u_ostr (ostr) {}
};
#endif