gmime r1276 - trunk/mono



Author: fejj
Date: Sun May 25 23:39:45 2008
New Revision: 1276
URL: http://svn.gnome.org/viewvc/gmime?rev=1276&view=rev

Log:
more csharp binding fixes

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

Modified: trunk/mono/GMime.metadata
==============================================================================
--- trunk/mono/GMime.metadata	(original)
+++ trunk/mono/GMime.metadata	Sun May 25 23:39:45 2008
@@ -106,13 +106,43 @@
        So rename this one -->
   <attr path="/api/namespace/struct[ cname='InternetAddress']/method[ cname='internet_address_get_type']" name="name">GetAddressType</attr>
 
-  <!-- Certain things take const unsigned char *, which the generator doesn't deal with nicely. -->
-  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ type='const-unsigned-char*']" name="name">str</attr>
-  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ type='const-unsigned-char*']" name="type">const-char*</attr>
+  <!-- Fix the base64/uu/qp encoder/decoder APIs. -->
+<!--
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='inbuf']" name="type">const-guint8*</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='inbuf']" name="array">true</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='inlen']" name="name">n_inbuf</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='n_inbuf']" name="pass_as"></attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='n_inbuf']" name="type">guint32</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='uubuf']" name="pass_as">ref</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='uubuf']" name="type">guint8*</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='uubuf']" name="array">true</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='outbuf']" name="pass_as">ref</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='outbuf']" name="type">guint8*</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='outbuf']" name="array">true</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='state']" name="pass_as">ref</attr>
+  <attr path="/api/namespace/class[ name='Utils']/*/*/parameter[ name='save']" name="pass_as">ref</attr>
+-->
+  <!-- Remove all of the encoder/decoders - we'll implement these manually -->
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='Base64EncodeStep']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='Base64EncodeClose']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='Base64DecodeStep']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='UuencodeStep']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='UuencodeClose']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='UudecodeStep']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='QuotedEncodeStep']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='QuotedEncodeClose']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ name='QuotedDecodeStep']"/>
+
+  <!-- Fix/Remove some other APIs from gmime-utils -->
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ cname='g_mime_utils_decode_8bit']"/>
+  <remove-node path="/api/namespace/class[ name='Utils']/method[ cname='g_mime_utils_text_is_8bit']"/>
+  <attr path="/api/namespace/class[ name='Utils']/method[ cname='g_mime_utils_best_encoding']/*/parameter[ name='text']" name="type">const-guint8*</attr>
+  <attr path="/api/namespace/class[ name='Utils']/method[ cname='g_mime_utils_best_encoding']/*/parameter[ name='text']" name="array">true</attr>
+  <attr path="/api/namespace/class[ name='Utils']/method[ cname='g_mime_utils_best_encoding']/*/parameter[ name='len']" name="type">guint32</attr>
+  <attr path="/api/namespace/class[ name='Utils']/method[ cname='g_mime_utils_best_encoding']/*/parameter[ name='len']" name="name">n_text</attr>
 
   <!-- Hide some problematic and nonsensical elements -->
   <attr path="/api/namespace/struct[ cname='GMimeHeader']/method[ name='SetRaw']" name="hidden">1</attr>
-  <attr path="/api/namespace/object[ cname='GMimeMessage']/method[ name='GetDate']/*/*[ name='date']" name="hidden">1</attr>
   <attr path="/api/namespace/object[ cname='GMimeStream']/method[ name='Read']" name="hidden">1</attr>
   <attr path="/api/namespace/object[ cname='GMimeStreamMem']/constructor[ cname='g_mime_stream_mem_new_with_byte_array']" name="hidden">1</attr>
   <attr path="/api/namespace/object[ cname='GMimeStreamFile']" name="hidden">1</attr>

Added: trunk/mono/Utils.custom
==============================================================================
--- (empty file)
+++ trunk/mono/Utils.custom	Sun May 25 23:39:45 2008
@@ -0,0 +1,62 @@
+[DllImport("gmime")]
+static extern uint g_mime_utils_base64_encode_step(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref int state, ref uint save);
+
+public static uint Base64EncodeStep(byte[] inbuf, ref byte[] outbuf, ref int state, ref uint save) {
+	return g_mime_utils_base64_encode_step(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_base64_encode_close(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref int state, ref uint save);
+
+public static uint Base64EncodeClose(byte[] inbuf, ref byte[] outbuf, ref int state, ref uint save) {
+	return g_mime_utils_base64_encode_close(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_base64_decode_step(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref int state, ref uint save);
+
+public static uint Base64DecodeStep(byte[] inbuf, ref byte[] outbuf, ref int state, ref uint save) {
+	return g_mime_utils_base64_decode_step(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_quoted_encode_step(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref int state, ref uint save);
+
+public static uint QuotedPrintableEncodeStep(byte[] inbuf, ref byte[] outbuf, ref int state, ref uint save) {
+	return g_mime_utils_quoted_encode_step(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_quoted_encode_close(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref int state, ref uint save);
+
+public static uint QuotedPrintableEncodeClose(byte[] inbuf, ref byte[] outbuf, ref int state, ref uint save) {
+	return g_mime_utils_quoted_encode_close(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_quoted_decode_step(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref int state, ref uint save);
+
+public static uint QuotedPrintableDecodeStep(byte[] inbuf, ref byte[] outbuf, ref int state, ref uint save) {
+	return g_mime_utils_quoted_decode_step(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_uuencode_step(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref byte[] uubuf, ref int state, ref uint save);
+
+public static uint UuEncodeStep(byte[] inbuf, ref byte[] outbuf, ref byte[] uubuf, ref int state, ref uint save) {
+	return g_mime_utils_uuencode_step(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref uubuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_uuencode_close(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref byte[] uubuf, ref int state, ref uint save);
+
+public static uint UuEncodeClose(byte[] inbuf, ref byte[] outbuf, ref byte[] uubuf, ref int state, ref uint save) {
+	return g_mime_utils_uuencode_close(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref uubuf, ref state, ref save);
+}
+
+[DllImport("gmime")]
+static extern uint g_mime_utils_uudecode_step(byte[] inbuf, uint n_inbuf, ref byte[] outbuf, ref int state, ref uint save);
+
+public static uint UuDecodeStep(byte[] inbuf, ref byte[] outbuf, ref int state, ref uint save) {
+	return g_mime_utils_uudecode_step(inbuf, inbuf == null ? 0 : (uint) inbuf.Length, ref outbuf, ref state, ref save);
+}

Modified: trunk/mono/gmime-api.raw
==============================================================================
--- trunk/mono/gmime-api.raw	(original)
+++ trunk/mono/gmime-api.raw	Sun May 25 23:39:45 2008
@@ -2577,27 +2577,27 @@
       <method name="8BitHeaderDecode" cname="g_mime_utils_8bit_header_decode" deprecated="1" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="text" />
         </parameters>
       </method>
       <method name="8BitHeaderEncode" cname="g_mime_utils_8bit_header_encode" deprecated="1" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="text" />
         </parameters>
       </method>
       <method name="8BitHeaderEncodePhrase" cname="g_mime_utils_8bit_header_encode_phrase" deprecated="1" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="text" />
         </parameters>
       </method>
       <method name="Base64DecodeStep" cname="g_mime_utils_base64_decode_step" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
         </parameters>
@@ -2605,9 +2605,9 @@
       <method name="Base64EncodeClose" cname="g_mime_utils_base64_encode_close" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
         </parameters>
@@ -2615,9 +2615,9 @@
       <method name="Base64EncodeStep" cname="g_mime_utils_base64_encode_step" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
         </parameters>
@@ -2651,38 +2651,38 @@
       <method name="HeaderDecodeDate" cname="g_mime_utils_header_decode_date" shared="true">
         <return-type type="time_t" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="str" />
           <parameter type="int*" name="tz_offset" />
         </parameters>
       </method>
       <method name="HeaderDecodePhrase" cname="g_mime_utils_header_decode_phrase" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="phrase" />
         </parameters>
       </method>
       <method name="HeaderDecodeText" cname="g_mime_utils_header_decode_text" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="text" />
         </parameters>
       </method>
       <method name="HeaderEncodePhrase" cname="g_mime_utils_header_encode_phrase" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="phrase" />
         </parameters>
       </method>
       <method name="HeaderEncodeText" cname="g_mime_utils_header_encode_text" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="text" />
         </parameters>
       </method>
       <method name="HeaderFold" cname="g_mime_utils_header_fold" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="str" />
         </parameters>
       </method>
       <method name="HeaderFormatDate" cname="g_mime_utils_header_format_date" shared="true">
@@ -2702,15 +2702,15 @@
       <method name="QuoteString" cname="g_mime_utils_quote_string" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="string" />
+          <parameter type="const-char*" name="str" />
         </parameters>
       </method>
       <method name="QuotedDecodeStep" cname="g_mime_utils_quoted_decode_step" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
         </parameters>
@@ -2718,9 +2718,9 @@
       <method name="QuotedEncodeClose" cname="g_mime_utils_quoted_encode_close" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
         </parameters>
@@ -2728,9 +2728,9 @@
       <method name="QuotedEncodeStep" cname="g_mime_utils_quoted_encode_step" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
         </parameters>
@@ -2738,7 +2738,7 @@
       <method name="StructuredHeaderFold" cname="g_mime_utils_structured_header_fold" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="str" />
         </parameters>
       </method>
       <method name="TextIs8bit" cname="g_mime_utils_text_is_8bit" shared="true">
@@ -2757,15 +2757,15 @@
       <method name="UnstructuredHeaderFold" cname="g_mime_utils_unstructured_header_fold" shared="true">
         <return-type type="char*" />
         <parameters>
-          <parameter type="const-char*" name="in" />
+          <parameter type="const-char*" name="str" />
         </parameters>
       </method>
       <method name="UudecodeStep" cname="g_mime_utils_uudecode_step" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
         </parameters>
@@ -2773,9 +2773,9 @@
       <method name="UuencodeClose" cname="g_mime_utils_uuencode_close" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="unsigned-char*" name="uubuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />
@@ -2784,9 +2784,9 @@
       <method name="UuencodeStep" cname="g_mime_utils_uuencode_step" shared="true">
         <return-type type="size_t" />
         <parameters>
-          <parameter type="const-unsigned-char*" name="in" />
+          <parameter type="const-unsigned-char*" name="inbuf" />
           <parameter type="size_t" name="inlen" />
-          <parameter type="unsigned-char*" name="out" />
+          <parameter type="unsigned-char*" name="outbuf" />
           <parameter type="unsigned-char*" name="uubuf" />
           <parameter type="int*" name="state" />
           <parameter type="guint32*" name="save" />



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