]> Some of my projects - aniplayer-old.git/commitdiff
- New (broken) hashing infrastructure
authoraptx <aptx@rhea.(none)>
Fri, 21 Aug 2009 11:12:51 +0000 (13:12 +0200)
committeraptx <aptx@rhea.(none)>
Fri, 21 Aug 2009 11:24:21 +0000 (13:24 +0200)
.gitignore
lib/anidbudpclient/anidbudpclient.pro
lib/anidbudpclient/anidbudpclient_global.h
src/videowindow.cpp

index 7eaebe1be29795372043cee6a7cffd75e2c5939a..a8caa85ce1c0499271e6782134cfe76503e11666 100644 (file)
@@ -61,6 +61,8 @@ qtc-gdbmacros
 
 # Binaries
 # --------
+build/aniplayer
 build/*.dll
 build/*.lib
 build/*.exe
+build/*.so*
index 1aabbb393c0ac8b0a3f77c353d3b7c9a2ff74435..b9deb3a78f30a09ae4181f9d801cfec811d4bfc2 100644 (file)
@@ -1,7 +1,8 @@
 # -------------------------------------------------
 # Project created by QtCreator 2009-03-22T14:53:52
 # -------------------------------------------------
-QT += network script
+QT += network \
+    script
 QT -= gui
 TEMPLATE = lib
 TARGET = anidbudpclient
@@ -15,16 +16,18 @@ static {
 }
 INCLUDEPATH += $$PWD
 DEPENDPATH += $$PWD
-
 DEFINES += ANIDBUDPCLIENT_LIBRARY
 SOURCES += client.cpp \
     abstractcommand.cpp \
     authcommand.cpp \
     rawcommand.cpp \
-       mylistaddcommand.cpp \
+    mylistaddcommand.cpp \
     logoutcommand.cpp \
     uptimecommand.cpp \
-    mylistcommand.cpp
+    mylistcommand.cpp \
+    hash.cpp \
+    hashproducer.cpp \
+    hashconsumer.cpp
 HEADERS += client.h \
     anidbudpclient_global.h \
     abstractcommand.h \
@@ -33,13 +36,16 @@ HEADERS += client.h \
     mylistaddcommand.h \
     logoutcommand.h \
     uptimecommand.h \
-    mylistcommand.h
-
+    mylistcommand.h \
+    hash.h \
+    hashproducer.h \
+    hashconsumer.h \
+       circularbuffer.h
 CONV_HEADERS += include/AniDBUdpClient/Client \
-       include/AniDBUdpClient/AbstractCommand \
-       include/AniDBUdpClient/RawCommand \
-       include/AniDBUdpClient/MyListCommand \
-       include/AniDBUdpClient/MyListAddCommand \
-       include/AniDBUdpClient/UptimeCommand
-
+    include/AniDBUdpClient/AbstractCommand \
+    include/AniDBUdpClient/RawCommand \
+    include/AniDBUdpClient/MyListCommand \
+    include/AniDBUdpClient/MyListAddCommand \
+       include/AniDBUdpClient/UptimeCommand \
+       include/AniDBUdpClient/Hash
 include(../../lib/qtstatemachine/src/qtstatemachine.pri)
index 2f5a1a48953a5aa3cee0d5c0e23d8869bb7b7773..e4052954a38341ceadf4e0575652606e2279bb3c 100644 (file)
@@ -40,6 +40,7 @@ namespace AniDBUdpClient
        {
                CLIENT_DESTROYED                        = -1,
                UNKNOWN_REPLY                           = 0,
+
                // POSITIVE 2XX
                LOGIN_ACCEPTED                          = 200, //a
                LOGIN_ACCEPTED_NEW_VER          = 201, //a
@@ -193,6 +194,10 @@ namespace AniDBUdpClient
        };
 
        Q_ENUMS(Error IdlePolicy ReplyCode State FileState);
+
+       namespace HashPrivate {
+               static const qint64 ED2K_PART_SIZE = 9728000;
+       }
 }
 
 #endif // ANIDBUDPCLIENT_GLOBAL_H
index 788efb03994029478bf6af6325254764d46c1cde..ebcde19782ce236a84ac0a2176546946879b263e 100644 (file)
 #include "seekslider.h"
 
 #ifndef NO_ANIDBUDPCLIENT
-#  include <AniDBUdpClient/Client>
-#  include <AniDBUdpClient/RawCommand>
-#  include <AniDBUdpClient/MyListAddCommand>
+#      include <AniDBUdpClient/Client>
+#      include <AniDBUdpClient/RawCommand>
+#      include <AniDBUdpClient/MyListAddCommand>
+#      include <AniDBUdpClient/Hash>
 #endif
 
 #include <QDebug>
@@ -245,6 +246,10 @@ void VideoWindow::open(const QString &file, bool closeOnStop)
                return;
        }
 
+//     AniDBUdpClient::Hash *h = new AniDBUdpClient::Hash(this);
+//     h->hashFile(fileInfo);
+
+
        playlist->setDirectory(fileInfo.absoluteDir());
        playlist->setCurrent(playlist->indexOfFile(file));