Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / lib / tt / bin / shell / copier.h
1 /*%%  (c) Copyright 1993, 1994 Hewlett-Packard Company                   */
2 /*%%  (c) Copyright 1993, 1994 International Business Machines Corp.     */
3 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                    */
4 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                              */
5 /*%%  $XConsortium: copier.h /main/3 1995/10/20 16:36:05 rswiston $                                                      */
6 /*
7  * copier.h - Interface to copier, an LS/TT-aware cp(1).
8  *
9  * Copyright (c) 1990 by Sun Microsystems, Inc.
10  *
11  */
12
13 #ifndef _COPIER_H
14 #define _COPIER_H
15
16 #include <api/c/tt_c.h>
17 #include <util/tt_string.h>
18
19 class copier : public _Tt_object {
20     public:
21         copier( char *arg0 );
22         virtual ~copier();
23
24         int                     do_cp();
25         Tt_status               do_ttcp();
26         bool_t                  can_cp( _Tt_string from_path );
27         Tt_status               open_tt();
28         Tt_status               close_tt();
29         void                    parse_args( int argc, char **argv );
30         void                    usage( FILE *fs = stderr ) const;
31         bool_t                  should_cp() { return _should_cp; }
32         bool_t                  tt_opened() { return _tt_opened; }
33
34     private:
35         void                    _parse_arg( char *arg );
36
37         _Tt_string              _process_name;
38         _Tt_string              _prog_name;
39         _Tt_string              _process_id;
40         _Tt_string_list_ptr     _args;
41         bool_t                  _should_cp;
42         bool_t                  _recurse;
43         bool_t                  _preserve;
44         bool_t                  _tt_opened;
45         _Tt_string_list_ptr     _from_paths;
46         _Tt_string              _to_path;
47         bool_t                  _to_path_is_dir;
48         bool_t                  _clonedir_mode;         /* see parse_args() */
49 };
50
51 #endif /* _COPIER_H */