Commit Graph

274 Commits

Author SHA1 Message Date
Alexander Larsson
056cec779a Add GResource functions to gio.symbols 2012-01-13 17:12:57 +01:00
Dan Winship
3f3e141ec8 Add GSocketClient::event, for tracking socket client status
This can be used for debugging, or for progress UIs ("Connecting to
example.com..."), or to do low-level tweaking on the connection at
various points in the process.

https://bugzilla.gnome.org/show_bug.cgi?id=665805
2011-12-22 15:44:24 -05:00
Dan Winship
57f279988c Add g_socket_connection_connect(), etc
Previously it was more or less assumed that GSocketConnections were
always connected, although this was not enforced. Make it explicit
that they don't need to be, and add methods to connect them, and
simplify GSocketClient by using those methods.

https://bugzilla.gnome.org/show_bug.cgi?id=665805
2011-12-22 13:22:25 -05:00
Ryan Lortie
0a22f63ebe Drop public menu APIs from GApplication
This is moving to Gtk, but we don't want to do it all right now.
2011-12-19 12:34:16 -05:00
Ryan Lortie
eefd08996f introduce GRemoteActionGroup
This interfaceifies the extra functions that were on GDBusActionGroup
for dealing with platform data.

The two main benefits of doing this:

  - no longer have to do a silly song and dance in GApplication to avoid
    calling GDBusActionGroup API from non-dbus-aware code

  - the interface can be reused by the action group exporter to avoid
    ugly and unbindable hook callbacks

https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-17 12:54:02 -05:00
Ryan Lortie
f58df66d4d GDBusActionGroup: add _full variants of activation
This allows the platform_data to be explicitly specified.
2011-12-16 22:23:30 -05:00
Ryan Lortie
e5ed11bcf8 Revert "GDBusActionGroup: add static platform registration"
This reverts commit fcc9902e98.
2011-12-16 21:25:57 -05:00
Ryan Lortie
fcc9902e98 GDBusActionGroup: add static platform registration
We provide a mechanism by which a 'platform' (eg: Gtk) can register some
hook functions to be called to collect platform-data at the point of
sending an outgoing action activation request and also to inform the
platform of this data on incoming requests (before and after dispatching
the actual request).

This can be used for forwarding timestamp and startup-notification
information (as is presently done in GApplication) but the before/after
hook could also be used for acquiring/releasing the Gdk lock or other
similar things.

https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-16 10:54:42 -05:00
Thomas Hindoe Paaboel Andersen
721667399a GFile: add g_file_new_temp
A convenience function that creates a temporary file and returns
a GFile and GFileIOStream for it.

The file is created using g_file_open_tmp.

https://bugzilla.gnome.org/show_bug.cgi?id=657085
2011-12-09 08:58:05 -05:00
Ryan Lortie
a65429cf44 gio.symbols fixes 2011-12-08 18:07:50 -05:00
Ryan Lortie
46e3dca2e4 gio symbol cleanups 2011-12-08 18:05:14 -05:00
Ryan Lortie
76527e5cd5 add GActionMap interface
This is an interface to represent GSimpleActionGroup-like objects (ie:
those GActionGroups that operate by containing a number of named GAction
instances).
2011-12-08 18:05:14 -05:00
Matthias Clasen
db34b1aebe Rename exporter APIs
There are no public 'exporter' objects, so don't allude to them
in the function names. At the same time, we want to make it clear
that these functions are D-Bus specific.

The new APIs are
g_action_group_dbus_export_start
g_action_group_dbus_export_query
g_action_group_dbus_export_stop
g_menu_model_dbus_export_start
g_menu_model_dbus_export_query
g_menu_model_dbus_export_stop
2011-12-08 18:05:12 -05:00
Matthias Clasen
ae0bd032ca Add g_application_set_menu
This adds ane asy way to export menu information alongside
the actions that are already exported by GApplication.
2011-12-08 18:05:12 -05:00
Ryan Lortie
d110fd9202 Add GMenuProxy
GMenuProxy can be used as a client-side wrapper
for the a menu model that has been exported on D-Bus.
2011-12-08 18:05:12 -05:00
Matthias Clasen
66e089f086 Add GMenuModel D-Bus exporter 2011-12-08 18:05:12 -05:00
Matthias Clasen
6b40d4eb6b Add GMenu markup
These functions serialize and deserialize a GMenuModel
to and from XML.
2011-12-08 18:05:12 -05:00
Matthias Clasen
13f5977735 Add GMenu 2011-12-08 18:05:12 -05:00
Matthias Clasen
12a39a05d3 Add GMenuModel 2011-12-08 18:05:12 -05:00
Ryan Lortie
c249e10d11 Add GDBusActionGroup
GDBusActionGroup can be used as a client-side wrapper
for the an action group that has been exported on D-Bus.
2011-12-08 18:05:12 -05:00
Ryan Lortie
940ec94f0a Add GActionGroup D-Bus exporter 2011-12-08 18:05:12 -05:00
Tristan Van Berkom
a00530ecb0 GDBusInterfaceSkeleton: make it possible to export on multiple connections
This is useful in peer-to-peer connections.

With minor changes by David Zeuthen <davidz@redhat.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=662718

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-02 11:20:21 -05:00
Ryan Lortie
01ce06ac27 gio.symbols: add g_application_[gs]et_default() 2011-11-26 20:28:50 -05:00
Ryan Lortie
f468e9c309 Add g_action_group_query_action()
This new API allows requesting multiple pieces of information about a
particular action in one go and also simplifies the burden for
GActionGroup implementations -- they need not implement all the separate
APIs now.
2011-11-26 19:25:32 -05:00
Ryan Lortie
fee2c87ba1 Add g_settings_schema_source_new_from_directory()
It is now possible for plugin loading systems to do the right thing.
2011-11-17 14:03:39 +00:00
Ryan Lortie
1e70072065 Add g_settings_new_full() taking GSettingsSchema 2011-11-17 14:03:39 +00:00
Ryan Lortie
269c999463 add boxed types for GSettingSchema{,Source} 2011-11-17 14:03:39 +00:00
Ryan Lortie
48b99017de speak of 'schema id' rather than 'schema name'
Schemas are identified by id='' in the xml file, so we should use the
same language on the C and GObject property APIs.
2011-11-17 14:03:39 +00:00
Ryan Lortie
d5fb032f72 new public header: gsettingsschema.h
Expose some GSettingsSchemaSource and GSettingsSchema APIs.

These are mostly useless so far...
2011-11-17 14:03:39 +00:00
Benjamin Otte
1985d54bb2 fileinfo: Add g_file_attribute_matcher_subtract()
Added as public API so I can write tests, the use case is local.
2011-11-16 17:19:02 +01:00
Benjamin Otte
b400127b3e fileinfo: Add g_file_attribute_matcher_to_string()
This is to be mainly used for debugging and tests.
2011-11-16 17:18:13 +01:00
Dan Winship
fe5ba0f291 add GNetworkMonitor, for... monitoring the network
Add GNetworkMonitor and its associated extension point, provide a base
implementation that always claims the network is available, and a
netlink-based implementation built on top of that that actually tracks
the network state.

https://bugzilla.gnome.org/show_bug.cgi?id=620932
2011-11-14 13:42:30 -05:00
Dan Winship
eb9755dc9c GInetAddressMask: new type for internet address range matching
Eg, for matching a GInetAddress to a range like "10.0.0.0/8" or
"fe80::/10"

https://bugzilla.gnome.org/show_bug.cgi?id=620932
2011-11-14 13:42:29 -05:00
David Zeuthen
915e2238c4 gio: Introduce get_sort_key() methods on GDrive, GVolume and GMount
This is needed to implement efficient and predictable proxy volume
monitors, see

 https://bugzilla.gnome.org/show_bug.cgi?id=661711

for details.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-18 14:29:18 -04:00
Chun-wei Fan
32214583c3 Fix gio.symbols
g_simple_action_get_parameter_type is now static, so this symbol needs to
be removed from here...
2011-10-17 23:54:17 +08:00
Dan Winship
de834bed30 GAppLaunchContext: add environment-manipulating functions
Add functions for manipulating the environment under which a
GAppLaunchContext will launch its children, to avoid thread-related
bugs with using setenv() directly.

FIXME: win32 side isn't implemented yet

https://bugzilla.gnome.org/show_bug.cgi?id=659326
2011-10-15 17:30:55 -04:00
Florian Müllner
1ed88f0615 desktop-app-info: Add support for X-GNOME-Keywords
With search gaining traction as being the preferred way to locate
applications, the existing .desktop file fields meant for browsing
often produce insufficient results.
gnome-control-center introduced a custom X-GNOME-Keywords field for
that purpose, which we plan to support in gnome-shell as well.

https://bugzilla.gnome.org/show_bug.cgi?id=661763
2011-10-14 23:30:21 +02:00
David Zeuthen
3f982cb9ab GUnixMountPoint: expose options
Make the options from an /etc/fstab entry available as public API -
this can be used to support options such as

 comment=gvfs.name=Foo\040Bar

to e.g. set the name of an fstab mount in the UI to "Foo Bar".

https://bugzilla.gnome.org/show_bug.cgi?id=660536

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-03 14:06:47 -04:00
Dan Winship
5a30712dc7 Remove !g_thread_supported() codepaths in gio
In particular, remove the libasyncns import, which was only used by
GUnixResolver, which is only used when threads are not available.
Likewise remove GWin32Resolver, and the hacky broken non-threaded
parts of GIOScheduler.

https://bugzilla.gnome.org/show_bug.cgi?id=616754
2011-09-09 12:47:39 -04:00
Stef Walter
49bb7cff4b gio: Add GTlsInteraction interaction method invocation guarantees
* Add 'invoke' style method, which can be used to call an interaction
   from any thread. The interaction will be run in the appropriate
   #GMainContext
 * Sync methods can be called whether main loop is running or not.
 * Derived classes can choose to implement only sync or async
   interaction method, and the invoke method will fill in the blanks.
 * Documentation for the above.
 * Tests for the above.

https://bugzilla.gnome.org/show_bug.cgi?id=657567
2011-08-30 18:30:02 +02:00
Matthias Clasen
be555ed2d0 Fix symbol lists 2011-08-27 23:30:43 -04:00
Stef Walter
d789e78dff giomodule: When loading GIO_EXTRA_MODULES skip duplicates
* Load modules from paths listed in GIO_EXTRA_MODULES environment
   variable first.
 * Ignore duplicate modules based on module basename.
 * Add the concept of GIOModuleScope which allows other callers to
   skip duplicate loaded modules, or block specific modules based on
   basename.
 * Document behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=656914
2011-08-26 15:27:19 +02:00
Colin Walters
5b68b49b20 GTimeZoneMonitor: Revert addition of this class
The main rationale for adding it was to avoid having gnome-shell
mmap'ing /etc/localtime once a second.  However, we can just as easily
run inotify there, and given no one else was clamoring for a way to
detect when the time zone changes, I don't see a need for public API
here - at least not yet.

In the bigger picture, I just don't believe that the vast majority of
applications are going to go out of their way to instantiate and keep
around a random GTimeZoneMonitor class.  And if they do, it's has the
side effect that for other bits of code in the process, local GDateTime
instances may start varying again!

So, if code can't rely on local GDateTime instances being in a
consistent state anyways, let's just do that always.  The
documentation now says that this is the case.  Applications have
always been able to work in a consistent local time zone by
instantiating a zone and then using it for GDateTime constructors.

We fix the "gnome-shell stats /etc/localtime once a second" issue by
using timerfd (in glib) and inotify (in gnome-shell).

https://bugzilla.gnome.org/show_bug.cgi?id=655129
2011-08-22 11:12:37 -04:00
Stef Walter
29aae440fb Fix up ABI symbols after GTlsDatabase merge.
https://bugzilla.gnome.org/show_bug.cgi?id=636572
2011-08-04 09:43:45 +02:00
Stef Walter
0f99cfa882 GTlsDatabase and related objects
The database is an abstract object implemented by the various TLS
backends, which is used by GTlsConnection to lookup certificates
and keys, as well as verify certificate chains.

Also add GTlsInteraction, which can be used to prompt the user
for a password or PIN (used with the database).

https://bugzilla.gnome.org/show_bug.cgi?id=636572
2011-08-04 08:54:55 +02:00
Vincent Untz
ae7c48b955 GDesktopAppInfo: Add g_desktop_app_info_get_show_in()
Necessary for rebasing gnome-menus on top of GDesktopAppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=655044
2011-07-23 10:05:12 +02:00
David Zeuthen
c404dbed11 gdbus-codegen: Add support for new org.gtk.GDBus.C.UnixFD annotation
Also add convenience _with_unix_fd_list variants to GDBusConnection,
GDBusProxy and GDBusMethodInvocation types to easily support this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-07-21 16:06:18 -04:00
Ryan Lortie
7dd25022ee Add g_simple_action_group_add_entries()
A convenience API for creating lots of actions quickly.
2011-06-29 16:20:52 +01:00
Ryan Lortie
5ff65d8695 Make 4 incompatible changes to the GAction API
This commit represents an API break to GAction in the following ways:

  - the 'set_state' entry in the GActionInterface vtable has been
    renamed to 'change_state'.  The number and order of vtable items has
    not otherwise changed.

  - g_action_set_state() has been renamed to g_action_change_state() to
    match the updated vtable entry.

  - the "state" property of the GAction interface has been changed to
    read-only to reflect the fact that g_action_set_state() no longer
    exists.

  - GSimpleActionClass has been hidden.  GSimpleAction can no longer be
    subclassed.

>> Rationale

g_action_set_state() has never been a true setter in the sense that
calling it will update the value of the "state" property.  It has always
been closer to "request 'state' to be changed to this value" with
semantics defined by the implementor of the interface.  This is why the
equivalent method in GActionGroup had its name changed from 'set' to
'change'.  This change makes the two interfaces more consistent and
removes any implication about the effect that calling set_state() should
have on the 'state' property.

>> Impact

This incompatible API break was undertaken only because I strongly
suspect that it will go entirely unnoticed.  If the break actually
affects anybody, then we will accommodate them (possibly going as far as
to revert this commit entirely).

The virtual table change only impacts implementors of GAction.  I
strongly suspect that this is nobody (except for GSimpleAction).

The hiding of GSimpleActionClass only impacts impacts subclasses of
GSimpleAction.  I strongly suspect that none of these exist.

The changing of the property to be read-only only affects people who
were trying to change the state by using GObject properties.  I strongly
suspect that this is nobody at all.

The removal of the g_action_set_state() call is the most dangerous, but
I still suspect that it will impact nobody outside of GLib.  If anybody
is impacted by this change then, at their request, I will reintroduce
the API as a deprecated alias for g_action_change_state().
2011-06-29 11:38:21 +01:00
Colin Walters
28254a38a7 GDataInputStream: Add _utf8() variants of _read_line
These will validate the resulting line, and throw a conversion error.
In practice these will likely be used by bindings, but it's good
for even C apps too that don't want to explode if that text file
they're reading into Pango actually has invalid UTF-8.

https://bugzilla.gnome.org/show_bug.cgi?id=652758
2011-06-16 20:03:02 -04:00