rcopier.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
  24. /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
  25. /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
  26. /*%% (c) Copyright 1993, 1994 Novell, Inc. */
  27. /*%% $XConsortium: rcopier.h /main/3 1995/10/20 16:36:39 rswiston $ */
  28. /*
  29. * rcopier.h - Interface to rcopier, an LS/TT-aware rcp(1).
  30. *
  31. * Copyright (c) 1990 by Sun Microsystems, Inc.
  32. *
  33. */
  34. #ifndef _RCOPIER_H
  35. #define _RCOPIER_H
  36. #include <Tt/tt_c.h>
  37. #include <util/tt_string.h>
  38. class rpath : public _Tt_object {
  39. public:
  40. rpath();
  41. rpath( _Tt_string r_path );
  42. virtual ~rpath();
  43. _Tt_string host() { return _host; }
  44. _Tt_string path() { return _path; }
  45. private:
  46. _Tt_string _host;
  47. _Tt_string _path;
  48. };
  49. declare_list_of(rpath)
  50. class rcopier : public _Tt_object {
  51. public:
  52. rcopier( char *arg0 );
  53. virtual ~rcopier();
  54. int do_rcp();
  55. Tt_status do_ttrcp();
  56. Tt_status open_tt();
  57. Tt_status close_tt();
  58. void parse_args( int argc, char **argv );
  59. void usage( FILE *fs = stderr ) const;
  60. bool_t should_rcp() { return _should_rcp; }
  61. bool_t tt_opened() { return _tt_opened; }
  62. private:
  63. void _parse_arg( char *arg );
  64. _Tt_string _process_name;
  65. _Tt_string _prog_name;
  66. _Tt_string _process_id;
  67. _Tt_string_list_ptr _args;
  68. bool_t _should_rcp;
  69. bool_t _tt_opened;
  70. _Tt_string _username;
  71. bool_t _preserve;
  72. bool_t _recurse;
  73. rpath_list_ptr _from_paths;
  74. rpath_ptr _to_path;
  75. bool_t _to_path_is_dir;
  76. };
  77. #endif /* _RCOPIER_H */