]>
cygwin.com Git - cygwin-apps/setup.git/blob - io_stream_rsync.h
2 * Copyright (c) 2001, Robert Collins.
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.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
16 #ifndef SETUP_IO_STREAM_RSYNC_H
17 #define SETUP_IO_STREAM_RSYNC_H
19 #include "io_stream.h"
22 /* io_stream to an rsync server.
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).
30 class io_stream_rsync
:public io_stream
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);
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
);
47 /* Not currently supported */
48 virtual int seek (long where
, io_stream_seek_t whence
);
49 /* can't guess, oh well */
51 /* Not currently supported */
52 virtual int set_mtime (int);
53 /* not currently supported */
54 virtual int get_mtime ()
59 virtual size_t get_size ();
60 /* Not currently supported
61 static int move (String const &,String const &);
64 /* always require parameters */
74 #endif /* SETUP_IO_STREAM_RSYNC_H */
This page took 0.036272 seconds and 5 git commands to generate.