gmime r1273 - trunk/mono



Author: fejj
Date: Sun May 25 13:58:46 2008
New Revision: 1273
URL: http://svn.gnome.org/viewvc/gmime?rev=1273&view=rev

Log:
more API fixes

Modified:
   trunk/mono/GMime.metadata
   trunk/mono/Message.custom
   trunk/mono/gmime-api.raw

Modified: trunk/mono/GMime.metadata
==============================================================================
--- trunk/mono/GMime.metadata	(original)
+++ trunk/mono/GMime.metadata	Sun May 25 13:58:46 2008
@@ -42,6 +42,18 @@
   <attr path="/api/namespace/struct[ cname='GMimeDisposition']/method[ name='Get']" name="name">GetDisposition</attr>
   <attr path="/api/namespace/struct[ cname='GMimeDisposition']/method[ name='Set']" name="name">SetDisposition</attr>
 
+  <!-- Clean up some unnecessary helper methods from GMimeObject -->
+  <remove-node path="/api/namespace/object[ cname='GMimeObject']/method[ cname='g_mime_object_get_content_type_parameter']"/>
+  <remove-node path="/api/namespace/object[ cname='GMimeObject']/method[ cname='g_mime_object_set_content_type_parameter']"/>
+
+  <!-- Remove duplicate functionality from GMimeMessage -->
+  <remove-node path="/api/namespace/object[ cname='GMimeMessage']/method[ cname='g_mime_message_add_header']"/>
+  <remove-node path="/api/namespace/object[ cname='GMimeMessage']/method[ cname='g_mime_message_get_header']"/>
+  <remove-node path="/api/namespace/object[ cname='GMimeMessage']/method[ cname='g_mime_message_set_header']"/>
+  <remove-node path="/api/namespace/object[ cname='GMimeMessage']/method[ cname='g_mime_message_get_headers']"/>
+  <remove-node path="/api/namespace/object[ cname='GMimeMessage']/method[ cname='g_mime_message_get_date']"/>
+  <remove-node path="/api/namespace/object[ cname='GMimeMessage']/method[ cname='g_mime_message_set_date']"/>
+
   <!-- Change some GMimePart APIs -->
   <remove-node path="/api/namespace/object[ cname='GMimePart']/method[ cname='g_mime_part_get_content_disposition']"/>
   <remove-node path="/api/namespace/object[ cname='GMimePart']/method[ cname='g_mime_part_set_content_disposition']"/>
@@ -76,6 +88,8 @@
   <attr path="/api/namespace/object[ cname='GMimeMultipart']/method[ name='Foreach']" name="name">ForeachPart</attr>
   <attr path="/api/namespace/object[ cname='GMimeStream']/method[ name='Length']" name="name">GetLength</attr>
   <attr path="/api/namespace/class[ name='Global']/method[ name='UserCharsets']" name="name">GetUserCharsets</attr>
+  <attr path="/api/namespace/class[ name='Locale']/method[ name='Charset']" name="name">GetCharset</attr>
+  <attr path="/api/namespace/class[ name='Locale']/method[ name='Language']" name="name">GetLanguage</attr>
 
   <!-- Fix up bindings for yencode/decode -->
   <attr path="/api/namespace/class[ name='Yencode']/method[ cname='g_mime_yencode_close']" name="name">EncodeClose</attr>

Modified: trunk/mono/Message.custom
==============================================================================
--- trunk/mono/Message.custom	(original)
+++ trunk/mono/Message.custom	Sun May 25 13:58:46 2008
@@ -18,20 +18,20 @@
 public System.Collections.IEnumerable References {
 	get {
 		string header = GetHeader ("References");
-	
+
 		if (header == null)
 			yield break;
 
 		GMime.References gmime_reference = GMime.References.Decode (header);
-	
+
 		// keep gmime_reference for cleanup later
 		GMime.References iterator = gmime_reference;
-	
+
 		while (! iterator.Equals (GMime.References.Zero)) {
 			yield return iterator;
 			iterator = iterator.Next ();
 		}
-		
+
 		gmime_reference.Clear ();
 		yield break;
 	}
@@ -66,7 +66,6 @@
 		else
 			first = false;
 
-
 		sb.Append (GLib.Marshaller.PtrToStringGFree (raw_str));
 
 		raw_list = internet_address_list_next (raw_list);
@@ -83,6 +82,9 @@
 [DllImport("gmime")]
 static extern void g_mime_message_get_date (IntPtr raw, out IntPtr date, out int gmt_offset);
 
+[DllImport("gmime")]
+static extern void g_mime_message_set_date (IntPtr raw, IntPtr date, int gmt_offset);
+
 public DateTime Date {
 	get {
 		IntPtr date_raw;
@@ -92,4 +94,7 @@
 
 		return GLib.Marshaller.time_tToDateTime (date_raw);
 	}
+	set {
+		g_mime_message_set_date (Handle, GLib.Marshaller.DateTimeTotime_t (value), 0);
+	}
 }

Modified: trunk/mono/gmime-api.raw
==============================================================================
--- trunk/mono/gmime-api.raw	(original)
+++ trunk/mono/gmime-api.raw	Sun May 25 13:58:46 2008
@@ -1298,6 +1298,9 @@
       <method name="GetContentDisposition" cname="g_mime_part_get_content_disposition">
         <return-type type="const-char*" />
       </method>
+      <method name="GetContentDispositionObject" cname="g_mime_part_get_content_disposition_object">
+        <return-type type="const-GMimeDisposition*" />
+      </method>
       <method name="GetContentDispositionParameter" cname="g_mime_part_get_content_disposition_parameter">
         <return-type type="const-char*" />
         <parameters>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]