|
@@ -211,7 +211,7 @@ bool RequestGroupMan::removeReservedGroup(a2_gid_t gid)
|
|
|
namespace {
|
|
|
|
|
|
void notifyDownloadEvent
|
|
|
-(const std::string& event, const SharedHandle<RequestGroup>& group)
|
|
|
+(DownloadEvent event, const SharedHandle<RequestGroup>& group)
|
|
|
{
|
|
|
// Check NULL to make unit test easier.
|
|
|
if(SingletonHolder<Notifier>::instance()) {
|
|
@@ -239,12 +239,12 @@ void executeStopHook
|
|
|
util::executeHookByOptName(group, option, PREF_ON_DOWNLOAD_STOP);
|
|
|
}
|
|
|
if(result == error_code::FINISHED) {
|
|
|
- notifyDownloadEvent(Notifier::ON_DOWNLOAD_COMPLETE, group);
|
|
|
+ notifyDownloadEvent(EVENT_ON_DOWNLOAD_COMPLETE, group);
|
|
|
} else if(result != error_code::IN_PROGRESS &&
|
|
|
result != error_code::REMOVED) {
|
|
|
- notifyDownloadEvent(Notifier::ON_DOWNLOAD_ERROR, group);
|
|
|
+ notifyDownloadEvent(EVENT_ON_DOWNLOAD_ERROR, group);
|
|
|
} else {
|
|
|
- notifyDownloadEvent(Notifier::ON_DOWNLOAD_STOP, group);
|
|
|
+ notifyDownloadEvent(EVENT_ON_DOWNLOAD_STOP, group);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -392,7 +392,7 @@ public:
|
|
|
group->setForceHaltRequested(false);
|
|
|
util::executeHookByOptName(group, e_->getOption(),
|
|
|
PREF_ON_DOWNLOAD_PAUSE);
|
|
|
- notifyDownloadEvent(Notifier::ON_DOWNLOAD_PAUSE, group);
|
|
|
+ notifyDownloadEvent(EVENT_ON_DOWNLOAD_PAUSE, group);
|
|
|
// TODO Should we have to prepend spend uris to remaining uris
|
|
|
// in case PREF_REUSE_URI is disabed?
|
|
|
} else {
|
|
@@ -508,7 +508,7 @@ void RequestGroupMan::fillRequestGroupFromReserver(DownloadEngine* e)
|
|
|
|
|
|
util::executeHookByOptName(groupToAdd, e->getOption(),
|
|
|
PREF_ON_DOWNLOAD_START);
|
|
|
- notifyDownloadEvent(Notifier::ON_DOWNLOAD_START, groupToAdd);
|
|
|
+ notifyDownloadEvent(EVENT_ON_DOWNLOAD_START, groupToAdd);
|
|
|
}
|
|
|
if(!pending.empty()) {
|
|
|
reservedGroups_.insert(reservedGroups_.begin(), RequestGroupKeyFunc(),
|
|
@@ -577,7 +577,7 @@ RequestGroupMan::DownloadStat RequestGroupMan::getDownloadStat() const
|
|
|
lastError);
|
|
|
}
|
|
|
|
|
|
-enum DownloadStatus {
|
|
|
+enum DownloadResultStatus {
|
|
|
A2_STATUS_OK,
|
|
|
A2_STATUS_INPR,
|
|
|
A2_STATUS_RM,
|
|
@@ -585,7 +585,7 @@ enum DownloadStatus {
|
|
|
};
|
|
|
|
|
|
namespace {
|
|
|
-const char* getStatusStr(DownloadStatus status, bool useColor)
|
|
|
+const char* getStatusStr(DownloadResultStatus status, bool useColor)
|
|
|
{
|
|
|
// status string is formatted in 4 characters wide.
|
|
|
switch(status) {
|