]> cygwin.com Git - cygwin-apps/setup.git/blame - io_stream_rsync.h
2002-07-15 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / io_stream_rsync.h
CommitLineData
b401ef47
RC
1/*
2 * Copyright (c) 2001, Robert Collins.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by Robert Collins <rbtcollins@hotmail.com>
13 *
14 */
15
16#ifndef _IO_STREAM_RSYNC_H_
17#define _IO_STREAM_RSYNC_H_
18
19#include "io_stream.h"
20#include "String++.h"
21
22/* io_stream to an rsync server.
23 * TODO: Implement :}.
24 * TODO: deal with passing the basis in cleanly. For now, the basis is
25 * assumed to be blank if the stream is opened via the generic interface,
26 * and not if provided to the custom constructor...
27 * The basis MUST support seek (0).
28 */
29
30class io_stream_rsync:public io_stream
31{
32public:
33 static int exists (String const &);
34 /* not currently supported
35 static int remove (String const &);
36 static int mklink (String const &, String const &, io_stream_link_t);
37 */
38 io_stream_rsync (String const &,String const &, io_stream * = 0);
39 virtual ~ io_stream_rsync ();
40 /* read data (duh!) */
41 virtual ssize_t read (void *buffer, size_t len);
42 /* provide data to (double duh!) (NB: not currently supported) */
43 virtual ssize_t write (const void *buffer, size_t len);
44 /* read data without removing it from the class's internal buffer */
45 virtual ssize_t peek (void *buffer, size_t len);
46 virtual long tell ();
47 /* Not currently supported */
48 virtual int seek (long where, io_stream_seek_t whence);
49 /* can't guess, oh well */
50 virtual int error ();
51 /* Not currently supported */
52 virtual int set_mtime (int);
53 /* not currently supported */
54 virtual int get_mtime ()
55 {
56 return 0;
57 };
58 /* IMPLEMENT ME */
59 virtual size_t get_size ();
60 /* Not currently supported
61 static int move (String const &,String const &);
62 */
63private:
64 /* always require parameters */
65 io_stream_rsync ()
66 {
67 };
68 io_stream *basis;
69 int lasterr;
70 String fname;
71 String lmode;
72};
73
74#endif /* _IO_STREAM_RSYNC_H_ */
This page took 0.026919 seconds and 5 git commands to generate.