X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Finterfaces%2Fio%2Fclass_Streamable.php;h=2c1439321e9826e21f792c34c18d2160faf2cb22;hb=a1a6fe495d2e61dee317af1b45ee6821eb0027e5;hp=71ee8eb88dd9e236c9a92d7b6f7b0376002474f8;hpb=c3106ae537f1d46274988826a070632a439e2c49;p=core.git diff --git a/inc/classes/interfaces/io/class_Streamable.php b/inc/classes/interfaces/io/class_Streamable.php index 71ee8eb8..2c143932 100644 --- a/inc/classes/interfaces/io/class_Streamable.php +++ b/inc/classes/interfaces/io/class_Streamable.php @@ -2,11 +2,11 @@ /** * An interface for streams * - * @author Roland Haeder + * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.shipsimu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,28 @@ * along with this program. If not, see . */ interface Streamable extends FrameworkInterface { + /** + * Determines seek position + * + * @return $seekPosition Current seek position + */ + function determineSeekPosition (); + + /** + * Seek to given offset (default) or other possibilities as fseek() gives. + * + * @param $offset Offset to seek to (or used as "base" for other seeks) + * @param $whence Added to offset (default: only use offset to seek to) + * @return $status Status of file seek: 0 = success, -1 = failed + */ + function seek ($offset, $whence = SEEK_SET); + + /** + * Size of file stack + * + * @return $size Size (in bytes) of file + */ + function size (); } // [EOF]