Trivial patch adds a karma-sharp binding for deleting files.
--
Bob Copeland %% www.bobcopeland.com
# HG changeset patch
# User [EMAIL PROTECTED]
# Node ID 2c32cfb1efb6fe349be1709dc6cc17bdc7e84c70
# Parent ec0228b22e470e476e13fa858a85f5c911b8fa76
Enable deletion of files
diff -r ec0228b22e47 -r 2c32cfb1efb6 karma-sharp/Device.cs
--- a/karma-sharp/Device.cs Sat Jul 22 20:16:26 2006 +0200
+++ b/karma-sharp/Device.cs Tue Jul 25 22:32:32 2006 -0400
@@ -30,7 +30,9 @@ namespace Karma {
private static extern void lk_karma_use_smalldb();
[DllImport ("karma")]
- private static extern void lk_karma_get_storage_details(int rio, int
storage_id, out uint n_files, out ulong s_size, out ulong f_space, out uint
highest_file_id);
+ private static extern void lk_karma_get_storage_details(int rio,
+ int storage_id, out uint n_files, out ulong s_size,
+ out ulong f_space, out uint highest_file_id);
[DllImport ("karma")]
private static extern IntPtr lk_properties_andOrSearch(int mode,
IntPtr search_in, string key, string data);
@@ -40,6 +42,9 @@ namespace Karma {
[DllImport ("karma")]
private static extern int lk_karma_write_smalldb();
+
+ [DllImport ("karma")]
+ private static extern int lk_karma_delete_file(int rio, int fid);
public event OnUploadHandler ProgressChanged;
@@ -97,6 +102,11 @@ namespace Karma {
filesToAdd.Add(filename);
}
+ public void DeleteSong(int id)
+ {
+ lk_karma_delete_file(rio_id, id);
+ }
+
public void Save()
{
// lk_karma_request_io_lock()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-karma-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel