This file is indexed.

/usr/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs-dns-sd.h is in libgnomevfs2-dev 1:2.24.4-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* gnome-vfs-dns-sd.h - DNS-SD functions

   Copyright (C) 2004 Red Hat, Inc

   The Gnome Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The Gnome Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the Gnome Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.

   Author: Alexander Larsson <alexl@redhat.com>
*/

#ifndef GNOME_VFS_DNS_SD_H
#define GNOME_VFS_DNS_SD_H

#include <sys/types.h>
#include <glib.h>
#include <glib-object.h>
#include <libgnomevfs/gnome-vfs-result.h>

G_BEGIN_DECLS

/* TODO:
 * a way to get default browse domain for domain
 * async listing of browse domains
 * some way to publish. Using dns update for unicast?
 */
   

typedef struct {
	char *name;
	char *type;
	char *domain;
} GnomeVFSDNSSDService;

typedef enum {
	GNOME_VFS_DNS_SD_SERVICE_ADDED,
	GNOME_VFS_DNS_SD_SERVICE_REMOVED
} GnomeVFSDNSSDServiceStatus;

GType gnome_vfs_dns_sd_service_status_get_type (void);
#define GNOME_VFS_TYPE_VFS_DNS_SD_SERVICE_STATUS (gnome_vfs_dns_sd_service_status_get_type())

typedef struct GnomeVFSDNSSDBrowseHandle GnomeVFSDNSSDBrowseHandle;
typedef struct GnomeVFSDNSSDResolveHandle GnomeVFSDNSSDResolveHandle;

/**
 * GnomeVFSDNSSDBrowseCallback:
 * @handle: handle of the operation generating the callback
 * @status: whether a service addition or removal was detected
 * @service: the service that was discovered or removed
 * @callback_data: user data defined when the callback was established
 *
 * Callback for the gnome_vfs_dns_sd_browse() function that informs
 * the user of services that are added or removed.
 **/
typedef void (* GnomeVFSDNSSDBrowseCallback) (GnomeVFSDNSSDBrowseHandle *handle,
					      GnomeVFSDNSSDServiceStatus status,
					      const GnomeVFSDNSSDService *service,
					      gpointer callback_data);

/**
 * GnomeVFSDNSSDResolveCallback:
 * @handle: handle of the operation generating the callback
 * @result: whether the resolve succeeded or not
 * @service: the service that was resolved
 * @host: the host name or ip of the host hosting the service
 * @port: the port number to use for the service
 * @text: a hash table giving additional options about the service
 * @text_raw_len: length of @text_raw
 * @text_raw: raw version of the additional options in @text
 * @callback_data: user data defined when the callback was established
 *
 * Callback for the gnome_vfs_dns_sd_resolve() function that is called
 * when a service has been resolved.
 *
 * The @host and @port can be used to contact the requested service, and
 * @text contains additional options as defined for the type requested.
 * 
 * To check for options being set in @text without any value ("key" as
 * opposed to "key=value") you must use g_hash_table_lookup_extended(), since
 * they are stored in the hash table with a NULL value, and g_hash_table_lookup()
 * can't tell that from the case where the key is not in the hash table.
 **/
typedef void (* GnomeVFSDNSSDResolveCallback) (GnomeVFSDNSSDResolveHandle *handle,
					       GnomeVFSResult result,
					       const GnomeVFSDNSSDService *service,
					       const char *host,
					       int port,
					       const GHashTable *text,
					       int text_raw_len,
					       const char *text_raw,
					       gpointer callback_data);

/* Async versions */


GnomeVFSResult
gnome_vfs_dns_sd_browse (GnomeVFSDNSSDBrowseHandle **handle,
			 const char *domain,
			 const char *type,
			 GnomeVFSDNSSDBrowseCallback callback,
			 gpointer callback_data,
			 GDestroyNotify callback_data_destroy_func);

GnomeVFSResult
gnome_vfs_dns_sd_stop_browse (GnomeVFSDNSSDBrowseHandle *handle);


GnomeVFSResult			      
gnome_vfs_dns_sd_resolve (GnomeVFSDNSSDResolveHandle **handle,
			  const char *name,
			  const char *type,
			  const char *domain,
			  int timeout,
			  GnomeVFSDNSSDResolveCallback callback,
			  gpointer callback_data,
			  GDestroyNotify callback_data_destroy_func);

GnomeVFSResult
gnome_vfs_dns_sd_cancel_resolve (GnomeVFSDNSSDResolveHandle *handle);


/* Sync versions */

GnomeVFSResult
gnome_vfs_dns_sd_browse_sync (const char *domain,
			      const char *type,
			      int timeout_msec,
			      int *n_services,
			      GnomeVFSDNSSDService **services);


GnomeVFSResult			      
gnome_vfs_dns_sd_resolve_sync (const char *name,
			       const char *type,
			       const char *domain,
			       int timeout_msec,
			       char **host, int *port,
			       GHashTable **text,
			       int *text_raw_len_out,
			       char **text_raw_out);

void
gnome_vfs_dns_sd_service_list_free (GnomeVFSDNSSDService *services,
				    int n_services);

GnomeVFSResult
gnome_vfs_dns_sd_list_browse_domains_sync (const char *domain,
					   int timeout_msec,
					   GList **domains);


GList *
gnome_vfs_get_default_browse_domains (void);


G_END_DECLS

#endif /* GNOME_VFS_DNS_SD_H */