summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-07-27 13:19:29 -0700
committerTingPing <tngpng@gmail.com>2013-07-27 13:19:29 -0700
commite2328e7a9175882bca3876b0f4edbe7beb8c0fd5 (patch)
tree8ef51cab36db2e81c5e1309aa1b679bedb5acc86 /src/common
parent942b92c7969a4b5e14c64c5451fbc86d61f5d818 (diff)
parent78d14a2b1e4c62eee76d707e134a6fd37a8658f8 (diff)
Merge pull request #687 from Mikah89/clear_dcc_list_rebased
Clear button in dcc download manager
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dcc.c9
-rw-r--r--src/common/dcc.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/common/dcc.c b/src/common/dcc.c
index 1137c444..5f4b1190 100644
--- a/src/common/dcc.c
+++ b/src/common/dcc.c
@@ -227,6 +227,15 @@ is_dcc (struct DCC *dcc)
 	return FALSE;
 }
 
+gboolean
+is_dcc_completed (struct DCC *dcc)
+{
+	if (dcc != NULL)
+		return (dcc->dccstat == STAT_FAILED || dcc->dccstat == STAT_DONE || dcc->dccstat == STAT_ABORTED);
+
+	return FALSE;
+}
+
 /* this is called from hexchat.c:hexchat_misc_checks() every 1 second. */
 
 void
diff --git a/src/common/dcc.h b/src/common/dcc.h
index e3163c8a..acb87f34 100644
--- a/src/common/dcc.h
+++ b/src/common/dcc.h
@@ -117,6 +117,7 @@ struct dccstat_info
 extern struct dccstat_info dccstat[];
 
 gboolean is_dcc (struct DCC *dcc);
+gboolean is_dcc_completed (struct DCC *dcc);
 void dcc_abort (session *sess, struct DCC *dcc);
 void dcc_get (struct DCC *dcc);
 int dcc_resume (struct DCC *dcc);