add byte[] overload for UpdateService
authorJames Willcox <snopr@snorp.net>
Thu, 17 Nov 2005 21:15:38 +0000 (21:15 +0000)
committerJames Willcox <snopr@snorp.net>
Thu, 17 Nov 2005 21:15:38 +0000 (21:15 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1000 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-sharp/EntryGroup.cs
avahi-sharp/en/Avahi/EntryGroup.xml

index 2ebecc2..ccdeec9 100644 (file)
@@ -275,6 +275,26 @@ namespace Avahi
                 }
             }
 
+            UpdateService (iface, proto, flags, name, type, domain, list);
+        }
+
+        public void UpdateService (int iface, Protocol proto, PublishFlags flags, string name, string type,
+                                   string domain, params byte[][] txt)
+        {
+            IntPtr list = avahi_string_list_new (IntPtr.Zero);
+
+            if (txt != null) {
+                foreach (byte[] item in txt) {
+                    list = avahi_string_list_add (list, item);
+                }
+            }
+
+            UpdateService (iface, proto, flags, name, type, domain, list);
+        }
+        
+        private void UpdateService (int iface, Protocol proto, PublishFlags flags, string name, string type,
+                                    string domain, IntPtr list)
+        {
             lock (client) {
                 int ret = avahi_entry_group_update_service_strlst (handle, iface, proto, flags,
                                                                    Utility.StringToBytes (name),
index 2d71786..22626e3 100644 (file)
         <remarks>To be added.</remarks>
       </Docs>
     </Member>
+    <Member MemberName="AddService">
+      <MemberSignature Language="C#" Value="public void AddService (int iface, Avahi.Protocol proto, Avahi.PublishFlags flags, string name, string type, string domain, string host, ushort port, byte[][] txt);" />
+      <MemberType>Method</MemberType>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="iface" Type="System.Int32" />
+        <Parameter Name="proto" Type="Avahi.Protocol" />
+        <Parameter Name="flags" Type="Avahi.PublishFlags" />
+        <Parameter Name="name" Type="System.String" />
+        <Parameter Name="type" Type="System.String" />
+        <Parameter Name="domain" Type="System.String" />
+        <Parameter Name="host" Type="System.String" />
+        <Parameter Name="port" Type="System.UInt16" />
+        <Parameter Name="txt" Type="System.Byte[][]">
+          <Attributes>
+            <Attribute>
+              <AttributeName>System.ParamArray</AttributeName>
+            </Attribute>
+          </Attributes>
+        </Parameter>
+      </Parameters>
+      <Docs>
+        <param name="iface">To be added.</param>
+        <param name="proto">To be added.</param>
+        <param name="flags">To be added.</param>
+        <param name="name">To be added.</param>
+        <param name="type">To be added.</param>
+        <param name="domain">To be added.</param>
+        <param name="host">To be added.</param>
+        <param name="port">To be added.</param>
+        <param name="txt">To be added.</param>
+        <summary>To be added.</summary>
+        <remarks>To be added.</remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="UpdateService">
+      <MemberSignature Language="C#" Value="public void UpdateService (int iface, Avahi.Protocol proto, Avahi.PublishFlags flags, string name, string type, string domain, byte[][] txt);" />
+      <MemberType>Method</MemberType>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="iface" Type="System.Int32" />
+        <Parameter Name="proto" Type="Avahi.Protocol" />
+        <Parameter Name="flags" Type="Avahi.PublishFlags" />
+        <Parameter Name="name" Type="System.String" />
+        <Parameter Name="type" Type="System.String" />
+        <Parameter Name="domain" Type="System.String" />
+        <Parameter Name="txt" Type="System.Byte[][]">
+          <Attributes>
+            <Attribute>
+              <AttributeName>System.ParamArray</AttributeName>
+            </Attribute>
+          </Attributes>
+        </Parameter>
+      </Parameters>
+      <Docs>
+        <param name="iface">To be added.</param>
+        <param name="proto">To be added.</param>
+        <param name="flags">To be added.</param>
+        <param name="name">To be added.</param>
+        <param name="type">To be added.</param>
+        <param name="domain">To be added.</param>
+        <param name="txt">To be added.</param>
+        <summary>To be added.</summary>
+        <remarks>To be added.</remarks>
+      </Docs>
+    </Member>
   </Members>
   <Docs>
     <summary>To be added.</summary>