GIO is striving to provide a modern, easy-to-use VFS API that sits at the right level in the library stack, as well as other generally useful APIs for desktop applications (such as networking and D-Bus support). The goal is to overcome the shortcomings of GnomeVFS and provide an API that is so good that developers prefer it over raw POSIX calls. Among other things that means using GObject.
Questions tagged [gio]
189 questions
0
votes
1 answer
How can I convert a GDBusInterface into a GDBusProxy?
I am trying to write some C that uses the DBus support in GLib's GIO.
I have a GDBusObjectManager and I have used g_signal_connect() to add a handler to the interface-added signal. The signature of the handler according to the docs…

Dave
- 885
- 2
- 10
- 20
0
votes
1 answer
g_io_channel + socket = client, and GIO not work properly
dude here im gonna create client and combine with GIO Channel, and after i put it all together, it seems appears to work on socket, but the g_io_channel not as watching, like crashing or such..
please see following code :
#include…

capede
- 945
- 1
- 13
- 26
0
votes
1 answer
AIX 7.2 GLib-GObject signal incoming is invalid
I have problem with glib2.56.1-2 from Linux toolbox. I have simple TCP server example I have found:
int main (int argc, char *argv[])
{
GError * error = NULL;
/* create the new socketservice */
GSocketService* service = g_socket_service_new…

uran235
- 13
- 2
0
votes
1 answer
Using Gio.SimpleAction argument in stateless action
The documentation for Gio.SimpleAction.new says that I can specify a name, which is a string, and a parameter type, which is a GLib.VariantType (or None). If I specify a GLib.VariantType for the second argument, how do I specify its value?
I know…

beezergeezer
- 15
- 5
0
votes
2 answers
chat socket + gio_channel doesnt show incoming packet immediately in c language?
folks please see following code :
#include
#include //socket();
#include //sockaddr_in
#include
#include
#include
#include
#define RECV_SIZE_MODE 1024 //…

capede
- 945
- 1
- 13
- 26
0
votes
1 answer
Why does signal connection invalidate the SocketClient object?
I am trying to make a TCP / TLS connection with the SocketClient class from Gio via giomm.
Everything was fine, until I connected to the SocketClient::event_signal () signal with sigc::ptr_fun ().
Here is a trimmed down example code that…

Jens Mühlenhoff
- 14,565
- 6
- 56
- 113
0
votes
2 answers
how to get dirname of a GFile?
When using GIO and GVFS, how do I best get the directory name of a GFile object? There is a get_basename() function but no get_dirname().
The function should work for remote URIs as well. Also, it should be available in Python.

oliver
- 1
0
votes
0 answers
Trying to create a gsocket server with GUI program
I am trying to set up server that also has a gui using GTK on a Raspberry Pi. The program is just a proof-of-concept demo.
I create a socket and the client can connect and send data, I see it in wireshark. But the read does not complete until the…

jollymonrogers
- 1
- 2
0
votes
1 answer
How can I check error code in Gnome/gjs/Gio
This doesn't work (nothing happens when the directory exists):
let s_dir = Gio.file_new_for_path("./S1");
try {
s_dir.make_directory(null);
} catch(e) {
if(e == Gio.IOErrorEnum.EXISTS)
print(e);
}

eiro
- 72
- 1
- 8
0
votes
1 answer
How can I get the SHA1 fingerprint of a TlsCertificate in GJS?
I'm trying to get a fingerprint of a Gio.TlsCertificate of a connection, which as I understand it is just a SHA1 checksum of the certificate in DER form. So I think I could use GLib.compute_checksum_for_data() on the certificate property of the…

andy.holmes
- 3,383
- 17
- 28
0
votes
1 answer
How can I get the remote address from an incoming message on UDP listener socket?
Although it's possible to read from a Gio.Socket by wrapping it's file-descriptor in Gio.DataInputStream, using Gio.Socket.receive_from() in GJS to receive is not possible because as commented here:
GJS will clone array arguments before passing…

andy.holmes
- 3,383
- 17
- 28
0
votes
1 answer
GMount and GVolume
I am new to GIO and I am totally confused between GMount and GVolume. The GIO reference says that GMount is a "mounted" filesystem that you can access while GVolume represents user-visible objects that can be mounted. I have a few questions about…

341008
- 9,862
- 11
- 52
- 84
0
votes
1 answer
Multiple mount events on mounting iPod
I am working on an app which has to detect if a storage volume is mounted or unmounted. I am using GIO for that. I listening for the mount-added and mount-removed signals. Everything works fine when I mount/unmount a pen drive. However, I am seeing…

341008
- 9,862
- 11
- 52
- 84
0
votes
1 answer
How to use types generated by gdbus-codegen?
I am implementing a dbus server, and to simplify things, I decided to use gdbus-codegen.
This hello world example and it's repository are going to generate header and source files. Then it do this to connect the signal to the…

BЈовић
- 62,405
- 41
- 173
- 273
0
votes
1 answer
HTTP not supported when using GLib’s GIO APIs
I'm writing a GTK application that sometimes downloads files with HTTP. Since I don't want to block normal execution, I obviously can't use urllib or Requests, so I'm trying to use GIO instead. However, I'm getting a GLib.Error: g-io-error-quark:…

Kyuuhachi
- 651
- 6
- 15