Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 3e51fe12b8ba8995c218e071f1ad9ec1 > files > 107

gnome-vfsmm2.6-doc-2.26.0-14.mga7.armv7hl.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libgnomevfsmm: dns-sd.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dns-sd.h</h1><a href="dns-sd_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright 2003 gnome-vfsmm Development Team</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00004"></a>00004 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00005"></a>00005 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00006"></a>00006 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00009"></a>00009 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00010"></a>00010 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00011"></a>00011 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00014"></a>00014 <span class="comment"> * License along with this library; if not, write to the Free</span>
<a name="l00015"></a>00015 <span class="comment"> * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00016"></a>00016 <span class="comment"> */</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef _LIBGNOMEVFSMM_DNS_SD_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define _LIBGNOMEVFSMM_DNS_SD_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="comment">//#include &lt;libgnomevfsmm/async-handle.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;<a class="code" href="enums_8h.html">libgnomevfsmm/enums.h</a>&gt;</span> <span class="comment">//For Result</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;glibmm.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;libgnomevfs/gnome-vfs-dns-sd.h&gt;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">namespace </span>Gnome
<a name="l00029"></a>00029 {
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">namespace </span>Vfs
<a name="l00032"></a>00032 {
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="comment">//Forward declaration</span>
<a name="l00035"></a>00035 <span class="keyword">class </span>exception;
<a name="l00036"></a>00036 
<a name="l00037"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html">00037</a> <span class="keyword">namespace </span>DnsSd
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="comment">//TODO: Hide the C structs?</span>
<a name="l00041"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#b13b3fc2f6ac35a959cd5df948e49cd1">00041</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>GnomeVFSDNSSDBrowseHandle <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#b13b3fc2f6ac35a959cd5df948e49cd1">BrowseHandle</a>;
<a name="l00042"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#0ccea055bc3be955ab14f9f75819b3a2">00042</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>GnomeVFSDNSSDResolveHandle <a class="code" href="classGnome_1_1Vfs_1_1ResolveHandle.html">ResolveHandle</a>;
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 
<a name="l00045"></a><a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html">00045</a> <span class="keyword">class </span><a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html">Service</a>
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047 <span class="keyword">public</span>:
<a name="l00048"></a><a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html#8f693a418398f63e9d741d4c677bf9e1">00048</a>   Glib::ustring <a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html#8f693a418398f63e9d741d4c677bf9e1">name</a>;
<a name="l00049"></a><a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html#15e31340834efa4c3508d2c34d09744c">00049</a>   Glib::ustring <a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html#15e31340834efa4c3508d2c34d09744c">type</a>;
<a name="l00050"></a><a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html#3616cfc320a5ed623f03922822cccf1f">00050</a>   Glib::ustring <a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html#3616cfc320a5ed623f03922822cccf1f">domain</a>;
<a name="l00051"></a>00051 };
<a name="l00052"></a>00052 
<a name="l00056"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dd37ba6c22a3bd75f97b3cb5b6f1931b">00056</a> <span class="keyword">typedef</span> sigc::slot&lt;void, BrowseHandle*, GnomeVFSDNSSDServiceStatus, const Service&amp;&gt; <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dd37ba6c22a3bd75f97b3cb5b6f1931b" title="For instance, void on_browse(BrowseHandle* handle, GnomeVFSDNSSDServiceStatus status...">BrowseSlot</a>;
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="comment">//The return value should only be used to call stop_browse().  </span>
<a name="l00059"></a>00059 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#b13b3fc2f6ac35a959cd5df948e49cd1">BrowseHandle</a>* <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#44c1cb9e7120d3f6534edd7ee70a4e26">browse</a>(<span class="keyword">const</span> Glib::ustring&amp; domain, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keyword">const</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dd37ba6c22a3bd75f97b3cb5b6f1931b" title="For instance, void on_browse(BrowseHandle* handle, GnomeVFSDNSSDServiceStatus status...">BrowseSlot</a>&amp; slot);
<a name="l00061"></a>00061 <span class="preprocessor">#else</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#b13b3fc2f6ac35a959cd5df948e49cd1">BrowseHandle</a>* <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#44c1cb9e7120d3f6534edd7ee70a4e26">browse</a>(<span class="keyword">const</span> Glib::ustring&amp; domain, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keyword">const</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dd37ba6c22a3bd75f97b3cb5b6f1931b" title="For instance, void on_browse(BrowseHandle* handle, GnomeVFSDNSSDServiceStatus status...">BrowseSlot</a>&amp; slot, std::auto_ptr&lt;Gnome::Vfs::exception&gt;&amp; error);
<a name="l00063"></a>00063 <span class="preprocessor">#endif //GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span>
<a name="l00065"></a>00065 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#d6b4e3f81af8bb0429bd6a1940498676">stop_browse</a>(<a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#b13b3fc2f6ac35a959cd5df948e49cd1">BrowseHandle</a>* handle);
<a name="l00067"></a>00067 <span class="preprocessor">#else</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#d6b4e3f81af8bb0429bd6a1940498676">stop_browse</a>(<a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#b13b3fc2f6ac35a959cd5df948e49cd1">BrowseHandle</a>* handle, std::auto_ptr&lt;Gnome::Vfs::exception&gt;&amp; error);
<a name="l00069"></a>00069 <span class="preprocessor">#endif //GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span>
<a name="l00071"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#880834dbb6435106f5acac713f5b38ec">00071</a> <span class="keyword">typedef</span> std::map&lt;Glib::ustring, Glib::ustring&gt; <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#880834dbb6435106f5acac713f5b38ec">ServiceOptions</a>;
<a name="l00072"></a>00072 
<a name="l00077"></a>00077 <span class="keyword">typedef</span> sigc::slot&lt;void, <a class="code" href="classGnome_1_1Vfs_1_1ResolveHandle.html">ResolveHandle</a>*, <a class="code" href="group__libgnomevfsmmEnums.html#gaa9bfd7859e3a82fe289184ae4bf440b">Result</a>, <span class="keyword">const</span> <a class="code" href="classGnome_1_1Vfs_1_1DnsSd_1_1Service.html">Service</a>&amp;, <span class="keyword">const</span> Glib::ustring&amp;, int,
<a name="l00078"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#e2543b11938128c5f14debae2c59c89d">00078</a>   <span class="keyword">const</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#880834dbb6435106f5acac713f5b38ec">ServiceOptions</a>&amp;&gt; <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#e2543b11938128c5f14debae2c59c89d" title="For instance, void on_resolve(ResolveHandle* handle, Result result, const Service&amp;amp;...">ResolveSlot</a>;
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 <span class="comment">//The return value should only be used to call cancel_resolve().</span>
<a name="l00081"></a>00081 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><a class="code" href="classGnome_1_1Vfs_1_1ResolveHandle.html">ResolveHandle</a>* <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#5911d292479589bc8b0ed3245c1a3fe4">resolve</a>(<span class="keyword">const</span> Glib::ustring&amp; name, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keyword">const</span> Glib::ustring&amp; domain,
<a name="l00083"></a>00083                        <span class="keywordtype">int</span> timeout, <span class="keyword">const</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#e2543b11938128c5f14debae2c59c89d" title="For instance, void on_resolve(ResolveHandle* handle, Result result, const Service&amp;amp;...">ResolveSlot</a>&amp; slot);
<a name="l00084"></a>00084 <span class="preprocessor">#else</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><a class="code" href="classGnome_1_1Vfs_1_1ResolveHandle.html">ResolveHandle</a>* <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#5911d292479589bc8b0ed3245c1a3fe4">resolve</a>(<span class="keyword">const</span> Glib::ustring&amp; name, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keyword">const</span> Glib::ustring&amp; domain,
<a name="l00086"></a>00086                        <span class="keywordtype">int</span> timeout, <span class="keyword">const</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#e2543b11938128c5f14debae2c59c89d" title="For instance, void on_resolve(ResolveHandle* handle, Result result, const Service&amp;amp;...">ResolveSlot</a>&amp; slot, std::auto_ptr&lt;Gnome::Vfs::exception&gt;&amp; error);
<a name="l00087"></a>00087 <span class="preprocessor">#endif //GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span>
<a name="l00089"></a>00089 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#4d9869a204cc5ff903a8abc935c6a017">cancel_resolve</a>(<a class="code" href="classGnome_1_1Vfs_1_1ResolveHandle.html">ResolveHandle</a>* handle);
<a name="l00091"></a>00091 <span class="preprocessor">#else</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#4d9869a204cc5ff903a8abc935c6a017">cancel_resolve</a>(<a class="code" href="classGnome_1_1Vfs_1_1ResolveHandle.html">ResolveHandle</a>* handle, std::auto_ptr&lt;Gnome::Vfs::exception&gt;&amp; error);
<a name="l00093"></a>00093 <span class="preprocessor">#endif //GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>  
<a name="l00095"></a>00095 
<a name="l00096"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#a13f4d86099d83825202f86f9dd61c41">00096</a> <span class="keyword">typedef</span> Glib::ListHandle&lt;Service&gt; <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#a13f4d86099d83825202f86f9dd61c41">ListHandleServices</a>;
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="comment">//TODO: Use a generic Glib *Handle instead of std::list&lt;Service&gt;?</span>
<a name="l00099"></a>00099 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#54d515007464b578e9efe9c9c130ddad">browse_sync</a>(<span class="keyword">const</span> Glib::ustring&amp; domain, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keywordtype">int</span> timeout_msec, std::list&lt;Service&gt;&amp; services);
<a name="l00101"></a>00101 <span class="preprocessor">#else</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#54d515007464b578e9efe9c9c130ddad">browse_sync</a>(<span class="keyword">const</span> Glib::ustring&amp; domain, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keywordtype">int</span> timeout_msec, std::list&lt;Service&gt;&amp; services, std::auto_ptr&lt;Gnome::Vfs::exception&gt;&amp; error);
<a name="l00103"></a>00103 <span class="preprocessor">#endif //GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span>
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#15a99f8f4ce2fc46369b09792991197d">resolve_sync</a>(<span class="keyword">const</span> Glib::ustring&amp; name, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keyword">const</span> Glib::ustring&amp; domain,
<a name="l00108"></a>00108                   <span class="keywordtype">int</span> timeout_msec, Glib::ustring&amp; host, <span class="keywordtype">int</span>&amp; port, <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#880834dbb6435106f5acac713f5b38ec">ServiceOptions</a>&amp; options);
<a name="l00109"></a>00109 <span class="preprocessor">#else</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#15a99f8f4ce2fc46369b09792991197d">resolve_sync</a>(<span class="keyword">const</span> Glib::ustring&amp; name, <span class="keyword">const</span> Glib::ustring&amp; type, <span class="keyword">const</span> Glib::ustring&amp; domain,
<a name="l00111"></a>00111                   <span class="keywordtype">int</span> timeout_msec, Glib::ustring&amp; host, <span class="keywordtype">int</span>&amp; port, <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#880834dbb6435106f5acac713f5b38ec">ServiceOptions</a>&amp; options, std::auto_ptr&lt;Gnome::Vfs::exception&gt;&amp; error);
<a name="l00112"></a>00112 <span class="preprocessor">#endif //GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span>
<a name="l00114"></a><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dea5b7a46cf017e2945b41a52c2b1a4f">00114</a> <span class="keyword">typedef</span> Glib::ListHandle&lt;Glib::ustring&gt; <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dea5b7a46cf017e2945b41a52c2b1a4f">ListHandleStrings</a>;
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dea5b7a46cf017e2945b41a52c2b1a4f">ListHandleStrings</a> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#cc8461092debf6d1b28b9a712ac6b9e6">list_browse_domains_sync</a>(<span class="keyword">const</span> Glib::ustring&amp; domain, <span class="keywordtype">int</span> timeout_msec);
<a name="l00118"></a>00118 <span class="preprocessor">#else</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span><a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dea5b7a46cf017e2945b41a52c2b1a4f">ListHandleStrings</a> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#cc8461092debf6d1b28b9a712ac6b9e6">list_browse_domains_sync</a>(<span class="keyword">const</span> Glib::ustring&amp; domain, <span class="keywordtype">int</span> timeout_msec, std::auto_ptr&lt;Gnome::Vfs::exception&gt;&amp; error);
<a name="l00120"></a>00120 <span class="preprocessor">#endif //GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span>
<a name="l00122"></a>00122 <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#dea5b7a46cf017e2945b41a52c2b1a4f">ListHandleStrings</a> <a class="code" href="namespaceGnome_1_1Vfs_1_1DnsSd.html#0ad6cc6c994ec5c262e8dbb85cc214d9">get_default_browse_domains</a>();
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 
<a name="l00125"></a>00125 } <span class="comment">// namespace DnsSd</span>
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 } <span class="comment">// namespace Vfs</span>
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 } <span class="comment">// namespace Gnome</span>
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Mar 16 18:27:50 2009 for libgnomevfsmm by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>