XDG key files reading and management

Hi guys,

I am currently working on an application and it needs to read and manage the freedesktop.org XDG files. I found in the glibmm a class to work with the desktop files of type Application. However, this doesn't work for the type Directory or Link files. So, I fall back using the Glib::KeyFile class on those files. Also, I noticed the Gio::DesktopAppInfo class doesn't handle everything about the file itself. I mean, suppose I want to change a key value or add a new entry or even a new group, I will have to process the file using Glib::KeyFile instead. However, if I want to monitor the file as well, I need to use the Gio::File class.

On another hand, when time comes to scan the directories defined by the XDG freedesktop.org standard, I rely on the boost::filesystem class.

I believe at this point it is probably obvious to you I am a little bit confuse about the approach I should use to handle these particular files. I am seeking for some advice from you on what should be the approach.

These files will need to be read, modified, monitored, deleted, key/value pairs processed, etc. I don't find any single class that performs all these tasks on these files. Someone has already encountered this problem? Anyone has an elegant solution or something that would prevent me to reinvent the wheel here? Or maybe the wheel is waiting to be reinvented.

Daniel Savard

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]