return true;
}
+void File::setState(const MyListAddCommand &state)
+{
+ m_state = state;
+}
void File::finishHashing()
{
updateStatus(MarkingWatched, Success);
}
+void File::finishSetState(bool success)
+{
+
+}
+
void File::work()
{
qDebug() << "work";
if (markReply) markReply->deleteLater();
markReply = clientInstance()->send(markCommand);
connect(markReply, SIGNAL(replyReady(bool)), this, SLOT(finishMarking(bool)));
-
updateStatus(MarkingWatched, InProgress);
}
+void File::startSetState()
+{
+ m_state.setEd2k(m_ed2k);
+ m_state.setSize(m_file.size());
+ m_state.setEdit(true);
+}
+
void File::init()
{
hashResult = 0;
break;
case MarkingWatched:
m_markingState = actionState;
- default:
- return;
+ break;
}
emit statusUpdate(action, actionState);
}
bool addToMyList();
bool markWatched();
+ void setState(const MyListAddCommand &state);
+
signals:
void statusUpdate(AniDBUdpClient::File::Action action, AniDBUdpClient::File::ActionState state, int percent = 0);
void finished();
void finishRenaming(bool success);
void finishAdding(bool success);
void finishMarking(bool success);
+ void finishSetState(bool success);
void work();
void workOnFinished(AniDBUdpClient::File::Action action, AniDBUdpClient::File::ActionState actionState);
void startRenaming();
void startAdding();
void startMarking();
+ void startSetState();
void init();
FileRenameDelegate *m_renameDelegate;
+ MyListAddCommand m_state;
+
ClientInterface *clientInstance() const;
static ClientInterface *m_clientInterface;
+
public:
static ClientInterface *clientInterface();
static void setClientInterface(ClientInterface *clientInterface);
-
};
} // namespace AniDBUdpClient