gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog libbase/LoadThread.cpp libbase/...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/LoadThread.cpp libbase/...
Date: Mon, 09 Jun 2008 20:27:14 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/06/09 20:27:13

Modified files:
        .              : ChangeLog 
        libbase        : LoadThread.cpp LoadThread.h 

Log message:
                * libbase/LoadThread.{cpp,h}: const correctness, 'size' alias
                  for getBytesTotal. This is aimed at making a LoadThread more
                  or less pluggable with an IOChannel [ still misses a blocking
                  seek to be 100% compatible ].

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6873&r2=1.6874
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/LoadThread.cpp?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/LoadThread.h?cvsroot=gnash&r1=1.20&r2=1.21

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6873
retrieving revision 1.6874
diff -u -b -r1.6873 -r1.6874
--- ChangeLog   9 Jun 2008 20:21:37 -0000       1.6873
+++ ChangeLog   9 Jun 2008 20:27:12 -0000       1.6874
@@ -1,3 +1,10 @@
+2008-06-09 Sandro Santilli <address@hidden>
+
+       * libbase/LoadThread.{cpp,h}: const correctness, 'size' alias
+         for getBytesTotal. This is aimed at making a LoadThread more
+         or less pluggable with an IOChannel [ still misses a blocking
+         seek to be 100% compatible ].
+
 2008-06-09 Benjamin Wolsey <address@hidden>
 
        * server/asobj/flash/geom/Matrix_as.cpp: specify template arguments

Index: libbase/LoadThread.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/LoadThread.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- libbase/LoadThread.cpp      9 Jun 2008 19:08:25 -0000       1.25
+++ libbase/LoadThread.cpp      9 Jun 2008 20:27:13 -0000       1.26
@@ -252,31 +252,31 @@
        return newret;
 }
 
-bool LoadThread::eof()
+bool LoadThread::eof() const
 {
        // Check if we're at the EOF
        if (_completed && _userPosition >= _loadPosition) return true;
        else return false;
 }
 
-size_t LoadThread::tell()
+size_t LoadThread::tell() const
 {
        return _userPosition;
 }
 
-long LoadThread::getBytesLoaded()
+long LoadThread::getBytesLoaded() const
 {
        // The load position is equal to the bytesloaded
        return _loadPosition;
 }
 
-long LoadThread::getBytesTotal()
+long LoadThread::getBytesTotal() const
 {
        // TODO: proxy to underlying stream instead ?
        return _streamSize;
 }
 
-bool LoadThread::completed()
+bool LoadThread::completed() const
 {
        return _completed;
 }

Index: libbase/LoadThread.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/LoadThread.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- libbase/LoadThread.h        9 Jun 2008 14:31:52 -0000       1.20
+++ libbase/LoadThread.h        9 Jun 2008 20:27:13 -0000       1.21
@@ -81,13 +81,13 @@
        size_t read(void *dst, size_t bytes);
 
        /// Return true if EOF has been reached
-       bool eof();
+       bool eof() const;
 
        /// Report global position within the file
-       size_t tell();
+       size_t tell() const;
 
        ///     Returns the number of bytes known to be accessable
-       long getBytesLoaded();
+       long getBytesLoaded() const;
 
        ///     Returns the total size of the file
        //
@@ -103,10 +103,13 @@
        /// or short of it... Reading the code is
        /// discouraging for me (--strk)
        ///
-       long getBytesTotal();
+       long getBytesTotal() const;
+
+       // alias for getBytesTotal()
+       long size() const { return getBytesTotal(); }
 
        /// Check if the load is completed
-       bool completed();
+       bool completed() const;
 
        /// Check if given position is confirmed to be accessable
        bool isPositionConfirmed(size_t pos) const




reply via email to

[Prev in Thread] Current Thread [Next in Thread]