summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorHelder Martins <heldermartins89@gmail.com>2013-07-10 18:29:10 +0100
committerHelder Martins <heldermartins89@gmail.com>2013-07-15 21:34:14 +0100
commit0c87c491460125f6fd0bcf74b135cec7ae04c00e (patch)
tree29b72fc383ba2b2c8929bec4d1a1a94a3dead6de /src/common
parent4cf61ccedbd031eb7500f9cd02ea3f7cc6631b52 (diff)
Implemented clear functionality for DCC download manager. Created clear button in DCC downloaded manager interface.
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 c0527510..57c0d477 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_fcompleted (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..6f3b152f 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_fcompleted (struct DCC *dcc);
 void dcc_abort (session *sess, struct DCC *dcc);
 void dcc_get (struct DCC *dcc);
 int dcc_resume (struct DCC *dcc);