Develop and Download Open Source Software

Browse CVS Repository

Contents of /lupin/lupin/LupinFramework/LupinPluginProtocol.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Wed Jul 13 05:09:40 2005 UTC (18 years, 9 months ago) by letter
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +10 -5 lines
File MIME type: text/x-chdr
buildarchiveinfodict is changed to return infodict
add pause/continue/stop process methods.

1 /*
2 * Copyright (c) 2004-2005 The Lupin Project. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without modification, are permitted
5 * provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice, this list of conditions
8 * and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of
11 * conditions and the following disclaimer in the documentation and/or other materials provided
12 * with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE LUPIN PROJECT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
15 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LUPIN PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
17 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
20 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
21 * POSSIBILITY OF SUCH DAMAGE.
22 */
23
24 #import "LPCompress.h"
25 #import "LPFile.h"
26
27 typedef enum {
28 LPErrorUnknown = -1,
29 LPErrorNoError = 0,
30 LPErrorWarning = 1,
31 LPErrorNotImplementMethod = 2,
32 LPErrorBadArgument = 3,
33 LPErrorNotExist = 4,
34 LPErrorBrokenArchive = 5,
35 LPErrorLockedArchive = 6,
36 LPErrorNotSupportFormat = 7,
37 LPErrorRequestPassword = 8,
38 LPErrorBadPassword = 9,
39 LPErrorFileOpening = 10,
40 LPErrorFileReading = 11,
41 LPErrorFileWriting = 12,
42 LPErrorFailureAllocateMemory = 13,
43 } LPError;
44
45
46 @protocol LupinPluginProtocol
47
48 + (id)alloc;
49 - (void)dealloc;
50 - (NSArray*)acceptableExtensions;
51 - (id)initWithFile:(NSString*)path;
52 #pragma mark Plugin Information
53 - (NSString*)pluginName;
54 - (NSString*)pluginAuthorName;
55 - (NSString*)pluginVersion;
56 - (NSString*)pluginURI;
57 - (NSString*)pluginEmail;
58 - (NSAttributedString*)pluginCopyright;
59 #pragma mark Archive Managing
60 - (LPFile*)buildArchiveInfoDict:(BOOL)hierarchy password:(NSString*)password;
61 - (BOOL)archiveAllUncompress:(NSString*)path exclude:(NSArray*)exclude password:(NSString*)password delegate:(id)delegate selector:(SEL)selector;
62 - (BOOL)archiveUncompress:(NSString*)path files:(NSArray*)files password:(NSString*)password delegate:(id)delegate selector:(SEL)selector;
63 - (BOOL)archiveCompress:(NSString*)path files:(NSArray*)files exclude:(NSArray*)exclude currentPath:(NSString*)currentPath compress:(LPCompress*)compress option:(NSDictionary*)option delegate:(id)delegate selector:(SEL)selector;
64 - (NSMutableData*)archiveUncompressToMemory:(LPFile*)file password:(NSString*)password;
65 - (BOOL)pauseProcess;
66 - (BOOL)continueProcess;
67 - (BOOL)stopProcess;
68 #pragma mark Process Information
69 - (BOOL)isProgressTraversable;
70 - (NSNumber*)processInfo:(NSString**)title;
71 #pragma mark Compress Information
72 - (NSArray*)compressInfo:(int)index;
73
74 @end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26