libdarc.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00034 #ifndef LIBDARC_H
00035 #define LIBDARC_H
00036
00037
00038 #include "translations.h"
00039 #include "mask.h"
00040 #include "user_interaction.h"
00041 #include "path.h"
00042 #include "statistics.h"
00043 #include "tools.h"
00044
00045 NAMESPACE_LIBDAR_START
00046
00047 #ifdef __cplusplus
00048 extern "C"
00049 {
00050 #endif
00051
00052
00077 #define LIBDAR_XXXXXXXX
00078 #define LIBDAR_NOEXCEPT 0
00079 #define LIBDAR_EMEMORY 1
00080 #define LIBDAR_EBUG 2
00081 #define LIBDAR_EINFININT 3
00082 #define LIBDAR_ELIMITINT 4
00083 #define LIBDAR_ERANGE 5
00084 #define LIBDAR_EDECI 6
00085 #define LIBDAR_EFEATURE 7
00086 #define LIBDAR_EHARDWARE 8
00087 #define LIBDAR_EUSER_ABORT 9
00088 #define LIBDAR_EDATA 10
00089 #define LIBDAR_ESCRIPT 11
00090 #define LIBDAR_ELIBCALL 12
00091 #define LIBDAR_UNKNOWN 13
00092 #define LIBDAR_ECOMPILATION 14
00104 #define LIBDAR_X_EINPUTSPEC 55
00265 typedef enum
00266 {
00267 dar_compression_none = 'n',
00268 dar_compression_zip = 'p',
00269 dar_compression_gzip = 'z',
00270 dar_compression_bzip2 = 'y'
00271 } dar_compression_algorithm;
00272
00274 typedef enum
00275 {
00276 dar_crypto_none = 0,
00277 dar_crypto_scrambling = 1,
00278 dar_crypto_blowfish = 2
00279 } dar_encryption_algorithm;
00280
00281
00310 typedef struct
00311 {
00312 U_I major;
00313 U_I minor;
00314 U_I micro;
00315 U_16 exception;
00316 intptr_t : 16;
00317 intptr_t : 32;
00318
00324 char* except_msg;
00327 intptr_t : __WORDSIZE;
00328 intptr_t : __WORDSIZE;
00329 } dar_sup_libversion;
00330
00334 DLLIMPORT void dar_sup_libversion_destroy( dar_sup_libversion* ref );
00354 DLLIMPORT bool dar_op_library_init( dar_sup_libversion* inout );
00355
00368 #define DAR_LIBRARY_INIT_MACRO(ref) \
00369 ref.major = LIBDARC_MAJOR_VERSION; \
00370 ref.minor = LIBDARC_MINOR_VERSION; \
00371 ref.micro = LIBDARC_MICRO_VERSION; \
00372 dar_op_library_init(&ref)
00373
00374
00375
00378 typedef struct
00379 {
00380 bool ea : 1;
00381 bool largefile : 1;
00382 bool nodump : 1;
00383 bool special_alloc : 1;
00384 bool thread_safe : 1;
00386 intptr_t : 7;
00387
00388 bool libz : 1;
00389 bool libbz2 : 1;
00390 bool libcrypto : 1;
00392 intptr_t : 13;
00393 intptr_t : 32;
00394
00395 U_I os_bits;
00396 intptr_t : 32;
00397 intptr_t : 32;
00398 intptr_t : 32;
00399
00400 intptr_t : __WORDSIZE;
00401
00402 } dar_sup_libfeature;
00403
00407 DLLIMPORT void dar_sup_libfeature_destroy( dar_sup_libfeature* ref );
00419 DLLIMPORT void dar_op_libfeature_query( dar_sup_libfeature* ref );
00420
00421
00428 struct _dar_archive;
00429 typedef struct _dar_archive dar_archive;
00430
00432 DLLIMPORT void dar_archive_destroy(dar_archive* ref);
00433
00434
00449 typedef struct
00450 {
00471 char* root_path;
00472
00473 intptr_t : __WORDSIZE ;
00474 intptr_t : __WORDSIZE ;
00475
00496 char* arc_path;
00517 char* arc_name;
00538 char* arc_ext;
00539
00540 intptr_t : __WORDSIZE ;
00541 intptr_t : __WORDSIZE ;
00542
00563 char* input_pipe;
00584 char* output_pipe;
00585
00586 intptr_t : __WORDSIZE ;
00587 intptr_t : __WORDSIZE ;
00588
00609 dar_mask* selection;
00630 dar_mask* subtree;
00631
00632 intptr_t : __WORDSIZE ;
00633 intptr_t : __WORDSIZE ;
00634 } dar_sup_spec;
00635
00646 DLLIMPORT bool dar_sup_spec_defaults( dar_sup_spec* ref );
00651 DLLIMPORT void dar_sup_spec_destroy( dar_sup_spec* ref );
00652
00659 typedef struct
00660 {
00682 dar_compression_algorithm compress_algo;
00703 U_I compress_level;
00724 dar_mask* compress_mask;
00745 dar_infinint* compress_min_size;
00746
00747 intptr_t : __WORDSIZE ;
00748
00770 dar_encryption_algorithm crypto_algo;
00792 U_32 crypto_size;
00814 char* crypto_pass;
00815
00816 intptr_t : __WORDSIZE ;
00817 intptr_t : __WORDSIZE ;
00818
00840 dar_infinint* file_size;
00863 dar_infinint* first_file_size;
00864
00865 intptr_t : __WORDSIZE ;
00866 intptr_t : 32;
00867 intptr_t : 32;
00868
00897 char* slice_execute;
00922 dar_infinint* hourshift;
00923
00924 intptr_t : __WORDSIZE ;
00925 } dar_sup_storage;
00926
00937 DLLIMPORT bool dar_sup_storage_defaults( dar_sup_storage* ref );
00942 DLLIMPORT void dar_sup_storage_destroy( dar_sup_storage* ref );
00943
00944
00951 typedef struct
00952 {
00973 bool allow_overwrite : 1;
00994 bool warn_overwrite : 1;
01015 bool slice_pause : 1;
01036 bool create_empty_stubs : 1;
01057 bool ea_system : 1;
01078 bool ea_user : 1;
01099 bool no_dump : 1;
01120 bool ignore_owner : 1;
01141 bool test_run : 1;
01165 bool alter_atime : 1;
01186 bool same_fs : 1;
01208 bool delete_marked : 1;
01209
01210 intptr_t : 4;
01211 intptr_t : 16;
01212
01233 bool restore_flat : 1;
01255 bool warn_remove_no_match : 1;
01277 bool only_more_recent : 1;
01278
01279 intptr_t : 13;
01280
01301 bool tar_format : 1;
01322 bool filter_unsaved : 1;
01323
01324 intptr_t : 14;
01325 } dar_sup_flags;
01326
01331 DLLIMPORT void dar_sup_flags_defaults( dar_sup_flags* ref );
01332
01361 typedef struct
01362 {
01364 U_16 type;
01365 intptr_t : 16;
01369 char* message;
01370 } dar_sup_exception;
01371
01376 DLLIMPORT void dar_sup_exception_destroy( dar_sup_exception* ref );
01377
01378
01454 DLLIMPORT dar_archive* dar_op_archive_create(
01455 dar_user_interaction_struct dialog,
01456 dar_archive* ref_archive,
01457 dar_sup_spec archive_options,
01458 dar_sup_storage format_options,
01459 dar_sup_flags option_flags,
01460 dar_statistics* operation_stats,
01461 dar_sup_exception* exception
01462 );
01463
01520 DLLIMPORT bool dar_op_archive_get_children_of(
01521 dar_user_interaction_struct dialog,
01522 dar_archive* archive,
01523 char* directory,
01524 dar_sup_exception* exception
01525 );
01526
01584 DLLIMPORT dar_archive* dar_op_archive_isolate(
01585 dar_user_interaction_struct dialog,
01586 dar_archive* ref_archive,
01587 dar_sup_spec archive_options,
01588 dar_sup_storage format_options,
01589 dar_sup_flags option_flags,
01590 dar_sup_exception* exception
01591 );
01592
01656 DLLIMPORT bool dar_op_archive_diff(
01657 dar_user_interaction_struct dialog,
01658 dar_archive* archive,
01659 dar_sup_spec archive_options,
01660 dar_sup_flags option_flags,
01661 dar_statistics* operation_stats,
01662 dar_sup_exception* exception
01663 );
01664
01730 DLLIMPORT bool dar_op_archive_extract(
01731 dar_user_interaction_struct dialog,
01732 dar_archive* archive,
01733 dar_sup_spec archive_options,
01734 dar_sup_storage format_options,
01735 dar_sup_flags option_flags,
01736 dar_statistics* operation_stats,
01737 dar_sup_exception* exception
01738 );
01739
01795 DLLIMPORT bool dar_op_archive_list(
01796 dar_user_interaction_struct dialog,
01797 dar_archive* archive,
01798 dar_sup_spec archive_options,
01799 dar_sup_flags option_flags,
01800 dar_sup_exception* exception
01801 );
01802
01868 DLLIMPORT bool dar_op_archive_test(
01869 dar_user_interaction_struct dialog,
01870 dar_archive* archive,
01871 dar_sup_spec archive_options,
01872 dar_statistics* operation_stats,
01873 dar_sup_exception* exception
01874 );
01875
01930 DLLIMPORT bool dar_op_archive_close(
01931 dar_archive* archive,
01932 dar_sup_exception* exception
01933 );
01934
01987 DLLIMPORT dar_archive* dar_op_archive_open(
01988 dar_user_interaction_struct dialog,
01989 dar_sup_spec archive_options,
01990 dar_sup_storage format_options,
01991 dar_sup_exception* exception
01992 );
01993
01994
02002 #ifdef __cplusplus
02003 }
02004 #endif
02005
02006
02007
02008
02009 NAMESPACE_LIBDAR_END
02010
02011
02012
02013 #endif
02014
02015
02016
02017
02018