This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Adding a couple functions to dcop

Tags: None
(comma "," separated)
tristion
Registered Member
Posts
2
Karma
0

Adding a couple functions to dcop

Mon Jul 23, 2007 1:05 am
Hello.

I wanted to display the information that getInfo() displays through dcop, but not all at once, so I seperated the information into three different functions. I've included the patches for anyone who's interested.

Cheers.
Tristion

Code: Select all
--- ktorrent-2.2/apps/ktorrent/dcopinterface.h  2007-07-02 10:48:49.000000000 -0600
+++ ktorrent-2.2.new/apps/ktorrent/dcopinterface.h      2007-07-22 18:11:59.000000000 -0600
@@ -45,6 +45,9 @@
        virtual QCStringList getTorrentInfo(int tornumber) = 0;
        virtual int getFileCount(int tornumber) = 0;
        virtual QCStringList getInfo() = 0;
+        virtual QString getSpeed() = 0;
+        virtual QString getTransfer() = 0;
+        virtual QString getDHT() = 0;
        virtual QCStringList getFileNames(int tornumber) = 0;
        virtual QValueList<int> getFilePriorities(int tornumber) = 0;
        virtual void setFilePriority(int tornumber, int index, int priority) = 0;


Code: Select all
--- ktorrent-2.2/apps/ktorrent/ktorrentdcop.h   2007-07-02 10:48:49.000000000 -0600
+++ ktorrent-2.2.new/apps/ktorrent/ktorrentdcop.h       2007-07-22 18:11:49.000000000 -0600
@@ -51,6 +51,9 @@
        virtual QCStringList getTorrentInfo(int tornumber);
        virtual int getFileCount(int tornumber);
        virtual QCStringList getInfo();
+        virtual QString getSpeed();
+        virtual QString getTransfer();
+        virtual QString getDHT();
        virtual QCStringList getFileNames(int tornumber);
        virtual QValueList<int> getFilePriorities(int tornumber);
        virtual void setFilePriority(int tornumber, int index, int priority);


Code: Select all
--- ktorrent-2.2/apps/ktorrent/ktorrentdcop.cpp 2007-07-02 10:48:49.000000000 -0600
+++ ktorrent-2.2.new/apps/ktorrent/ktorrentdcop.cpp     2007-07-22 18:11:37.000000000 -0600
@@ -152,6 +152,24 @@
        return info;
 }

+QString KTorrentDCOP::getSpeed()
+{
+        QString info = app->getStatusSpeed();
+       return info;
+}
+
+QString KTorrentDCOP::getTransfer()
+{
+        QString info = app->getStatusTransfer();
+       return info;
+}
+
+QString KTorrentDCOP::getDHT()
+{
+        QString info = app->getStatusDHT();
+       return info;
+}
+
 int KTorrentDCOP::getFileCount(int tornumber)
 {
        return app->getCore().getFileCount(tornumber);


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]