home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2002 July
/
VPR0207A.ISO
/
OLS
/
UNRAR32007
/
unrar32007.lzh
/
src.lzh
/
src
/
rar.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-01-11
|
2KB
|
84 lines
/*
* Copyright (c) 1998-2001 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_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;
EXTRACTINGINFOEX u_ex;
int mkdirhier (const char *);
int check_timestamp (const char *, const RARHeaderData &);
int parse_opt (int, char **);
int extract (rarData &, const char *, const RARHeaderData &,
class progress_dlg &);
int extract ();
int extract1 ();
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;
int canceled () const;
int skip (rarData &rd, const char *path) const;
public:
int xmain (int, char **);
UnRAR (HWND hwnd, ostrbuf &ostr) : u_hwnd (hwnd), u_ostr (ostr) {}
};
#endif