![]() |
![]() |
![]() |
GnomeVFS - Filesystem Abstraction library | ![]() |
---|---|---|---|---|
Top | Description |
GnomeVFSResult gnome_vfs_resolve (const char *hostname
,GnomeVFSResolveHandle **handle
); void gnome_vfs_resolve_free (GnomeVFSResolveHandle *handle
); gboolean gnome_vfs_resolve_next_address (GnomeVFSResolveHandle *handle
,GnomeVFSAddress **address
); void gnome_vfs_resolve_reset_to_beginning (GnomeVFSResolveHandle *handle
); GnomeVFSAddress; GnomeVFSAddress * gnome_vfs_address_dup (GnomeVFSAddress *address
); void gnome_vfs_address_free (GnomeVFSAddress *address
); int gnome_vfs_address_get_family_type (GnomeVFSAddress *address
); guint32 gnome_vfs_address_get_ipv4 (GnomeVFSAddress *address
); GType gnome_vfs_address_get_type (void
); GnomeVFSAddress * gnome_vfs_address_new_from_ipv4 (guint32 ipv4_address
); GnomeVFSAddress * gnome_vfs_address_new_from_sockaddr (struct sockaddr *sa
,int len
); GnomeVFSAddress * gnome_vfs_address_new_from_string (const char *address
); char * gnome_vfs_address_to_string (GnomeVFSAddress *address
);
GnomeVFSResult gnome_vfs_resolve (const char *hostname
,GnomeVFSResolveHandle **handle
);
Tries to resolve hostname
. If the operation was successful you can
get the resolved addresses in form of GnomeVFSAddress by calling
gnome_vfs_resolve_next_address()
.
|
hostname you want to resolve. |
|
pointer to a pointer to a GnomeVFSResolveHandle. |
Returns : |
A GnomeVFSResult indicating the success of the operation. |
Since 2.8
void gnome_vfs_resolve_free (GnomeVFSResolveHandle *handle
);
Use this function to free a GnomeVFSResolveHandle returned by
gnome_vfs_resolve()
.
|
a GnomeVFSResolveHandle. |
Since 2.8
gboolean gnome_vfs_resolve_next_address (GnomeVFSResolveHandle *handle
,GnomeVFSAddress **address
);
Stores the next GnomeVFSAddress available in handle
of the
former lookup in address
.
|
a GnomeVFSResolveHandle. |
|
a pointer to a pointer to a GnomeVFSAddress. |
Returns : |
TRUE if the next address was stored in address or
FALSE if no other address is available. |
Since 2.8
void gnome_vfs_resolve_reset_to_beginning
(GnomeVFSResolveHandle *handle
);
Reset handle
so that a following call to gnome_vfs_resolve_next_address()
will return the first resolved address.
|
a GnomeVFSResolveHandle. |
Since 2.8
GnomeVFSAddress * gnome_vfs_address_dup (GnomeVFSAddress *address
);
Duplicates address
.
|
A GnomeVFSAddress. |
Returns : |
Duplicated address or NULL if address was not valid. |
Since 2.8
void gnome_vfs_address_free (GnomeVFSAddress *address
);
Frees the memory allocated for address
.
|
A GnomeVFSAddress. |
Since 2.8
int gnome_vfs_address_get_family_type (GnomeVFSAddress *address
);
Use this function to retrive the address family of address
.
|
A pointer to a GnomeVFSAddress |
Returns : |
The address family of address . |
Since 2.8
guint32 gnome_vfs_address_get_ipv4 (GnomeVFSAddress *address
);
|
A GnomeVFSAddress. |
Returns : |
The associated IPv4 address in network byte order. Note that you should avoid using this function because newly written code should be protocol independent. |
Since 2.8
GnomeVFSAddress * gnome_vfs_address_new_from_ipv4 (guint32 ipv4_address
);
Creates a new GnomeVFSAddress from ipv4_address
.
Note that this function should be avoided because newly written code should be protocol independent.
|
A IPv4 Address in network byte order |
Returns : |
A new GnomeVFSAdress. |
Since 2.8
GnomeVFSAddress * gnome_vfs_address_new_from_sockaddr (struct sockaddr *sa
,int len
);
Creates a new GnomeVFSAddress from sa
.
|
A pointer to a sockaddr. |
|
The size of sa . |
Returns : |
The new GnomeVFSAddress
or NULL if sa was invalid or the address family isn't supported. |
Since 2.8
GnomeVFSAddress * gnome_vfs_address_new_from_string (const char *address
);
Creates a new GnomeVFSAddress from the given string or NULL
if address
isn't a valid.
|
A string representation of the address. |
Returns : |
The new GnomeVFSAddress. |
Since 2.8
char * gnome_vfs_address_to_string (GnomeVFSAddress *address
);
Translate address
to a printable string.
|
A pointer to a GnomeVFSAddress |
Returns : |
A newly alloced string representation of address which
the caller must free. |
Since 2.8