Commit Graph

42 Commits

Author SHA1 Message Date
Ryan Lortie
5400b0b38c GPeriodic: a periodic event clock
Add a new class, GPeriodic.

We hope to use this as a paint clock that can be shared by GTK and
Clutter.  Many changes are still expected to the API.
2010-10-20 11:47:31 +02:00
Ryan Lortie
3e6eee806c GApplication: add remote commandline support 2010-10-19 01:16:46 +02:00
Ryan Lortie
846b0b3466 GAction is now an interface
the new class GSimpleAction is the implementation half
2010-08-30 19:26:37 +02:00
Nicolas Dufresne
a7e0e8fc08 Adding GProxyAddressEnumerator class
An implementation of GSocketAddressEnumerator that handles proxy
enumeration. This class is mainly usefull for Connectables implementation
such as NetworkService, NetworkAddress and SocketAddress to handle proxies.

Reviewed-by: Dan Winship <danw@gnome.org>
2010-08-19 16:32:37 -04:00
Nicolas Dufresne
d76de5e359 Added GProxy interface for proxy extension point
Implement an extension point for proxy protocol implementation. This
is mainly useful for socket-based proxy where it is possible to use the
proxied socket the same way it would for other stream based socket.

Reviewed-by: Dan Winship <danw@gnome.org>
2010-08-19 16:32:37 -04:00
Nicolas Dufresne
466111c960 Implement GProxyAddress
A GSocketInetAddress representing the proxy server address with additional
properties proxy type, destination address and port, username and password.

Reviewed-by: Dan Winship <danw@gnome.org>
2010-08-19 16:32:37 -04:00
Nicolas Dufresne
f3debedfd2 Implemented proxy-resolver extension point
This extension point allow extending GLib with library like LibProxy that
interprets system proxy settings and finds the appropriate configuration
based on the type of connection being made.

Reviewed-by: Dan Winship <danw@gnome.org>
2010-08-19 16:32:36 -04:00
Ryan Lortie
5db9e5ad58 add GSimpleActionGroup
and a simple test
2010-08-18 02:18:54 -04:00
Ryan Lortie
e1ded9f900 add gaction.h to gio.h 2010-08-18 01:56:34 -04:00
Ryan Lortie
6fe74a4c6a Add gactiongroup.h to gio.h 2010-08-18 00:33:17 -04:00
David Zeuthen
32f2e9a85b Bug 621213 – GDBusProxy and well-known names
Allow constructing a GDBusProxy for well-known names as discussed here
http://mail.gnome.org/archives/gtk-devel-list/2009-October/msg00075.html
including test cases.

Make it possible to create a GDBusProxy for a GBusType instead of a
GDBusConnection. This requires G_BUS_TYPE_NONE so add that too.

Nuke g_bus_watch_proxy() since one can now more or less use GDBusProxy
for this.

Port gdbus-example-watch-proxy to this new API and include this
example in the GDBusProxy doc page.

Also nuke the GType parameter from the GDBusProxy constructors as
requested here: https://bugzilla.gnome.org/show_bug.cgi?id=621229

Also update the porting guide and other API docs for this change.

Also fix a bug in the signal dispatching code so each subscriber only
get notified once, not N times, for the same signal. Also add a test
case for this.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-06-11 18:21:27 -04:00
Matthias Clasen
6427e93757 Merge the wip/gapplication branch
This adds a GApplication object to GIO, which is the core of
an application support class, supporting
- uniqueness
- exporting actions (simple scripting)
- standard actions (quit, activate)

The implementation for Linux uses D-Bus, takes a name on the
session bus, and exports a org.gtk.Application interface.

Implementations for Win32 and OS X are still missing.
2010-06-07 13:48:42 -04:00
Matthias Clasen
9371ca0cc2 Sort gio.h includes alphabetically 2010-06-06 16:15:44 -04:00
Ryan Lortie
7a4860d69a Bug 620519 - GPermission
Add an abstract interface representing the permission to perform an
action.
2010-06-04 19:03:38 +02:00
Matthias Clasen
1d22b64843 Cleanups
Sort #includes a bit better, and don't include platform-specific
headers in gio.h.
2010-05-14 08:38:07 -04:00
David Zeuthen
d0a14469d0 Initial GDBus code-drop from GDBus-standalone repo
Things compile and the test-suite passes. Still need to hook up
gio.symbols and docs. There are still a bunch of TODOs left in the
sources that needs to be addressed.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-06 14:21:32 -04:00
Ryan Lortie
a187634b29 merge GSettings 2010-04-16 23:23:40 -04:00
Alexander Larsson
2bfddf162e Remove GUtf8InputStream for now
It turns out that the way this worked did not work out for the current
main usecase (gedit) due to issues with how this is best integrated
with GtkTextView. So, in order to not have to support an unused non-ideal
API forever we remove this before its been in a stable release.

The basic feature seems to have some utility though, so we hope for it
to eventually return in a better form.
2010-03-01 09:56:02 +01:00
Paolo Borelli
568cd48365 Add GUtf8InputStream - Bug #603270
Add a filter input stream that performs utf8 validation.
2009-12-06 15:23:33 +01:00
Alexander Larsson
92b9218cbf Add GZlibCompressor 2009-11-23 16:22:53 +01:00
Alexander Larsson
38c3eb14e4 Add GZlibDecompressor for zlib decompression 2009-11-23 16:22:53 +01:00
Alexander Larsson
7f8991596b Add GConverterOutputStream
This allows for conversion when saving
2009-11-23 16:22:52 +01:00
Alexander Larsson
848e0bf760 Add GConverterInputStream
Read and convert data from an input stream
2009-11-23 16:22:52 +01:00
Alexander Larsson
4b8382823e Add GCharsetConverter 2009-11-23 16:22:52 +01:00
Alexander Larsson
0d86b25f91 Add GConverter interface
This is an interface for stateful conversions of data. Its a generic
interface suitable for things like IConv, compression, decompression,
and regexp replacement.
2009-11-23 16:22:52 +01:00
Alexander Larsson
ce8361217c Import all the highlevel socket classes from gnio 2009-05-15 21:26:24 +02:00
Alexander Larsson
145cec3c93 Import GInitable, GSocket and dependencies from gnio
This adds:
GInitable - failable object constructor interface
GAsyncInitable - async failable object constructor interface
GSocket - Platform independent lowlevel berkely socket style object
GSocketControlMessage - For passing control messages over GSocket
GUnixFDMessage - unix fd passing socket control message

Some changes were done during the import from gnio to make things
work in glib. For instance, types were moved to other headers, header
file boiler plate were updated to glib style and gio.symbols stuff
was added.
2009-05-14 15:44:36 +02:00
Alexander Larsson
bd0b8c60c2 Add GFileIOStream class
This is similar to GFileInputStream and GFileOutputStream for GIOStreams.
The default implementations chain to the Output stream.
2009-05-13 14:42:46 +02:00
Alexander Larsson
05f544c591 Import GIOStream from gnio
Based on gnio rev 84516a5f544d8d5f3da368a83844e84eca8ef771
2009-05-13 14:42:38 +02:00
Dan Winship
9a3d18d2a6 GResolver wrappers: GNetworkAddress, GNetworkService, GSocketConnectable
Higher-level wrappers around GResolver. GSocketConnectable provides an
interface for synchronously or asynchronously iterating multiple
socket addresses, with GNetworkAddress and GNetworkService providing
interfaces based on hostname and SRV record resolution.
Part of #548466.
2009-04-22 08:36:38 -04:00
Dan Winship
c94d3f9288 Add GResolver, a glib-ish interface to DNS
GResolver provides asynchronous (and synchronous-but-cancellable) APIs
for resolving hostnames, reverse-resolving IP addresses back to
hostnames, and resolving SRV records. Part of #548466.
2009-04-22 08:36:32 -04:00
Dan Winship
68fc055627 Add network address and socket types
Types and methods for dealing with IPv4 and IPv6 addresses (and UNIX
domain socket addresses under UNIX). This does not include code for
actual socket I/O.

Originally from "gnio". Much of the code was written by Christian
Kellner, Samuel Cormier-Iijima, and Ryan Lortie.

Part of #548466.
2009-04-22 08:36:10 -04:00
Michael Natterer
f2a2d6c9ac big header formatting cleanup: indentation, vtable formatting, consistent
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* *.h: big header formatting cleanup: indentation, vtable
	formatting, consistent spacing in (* vfunc), trailing whitespace
	removal. Formatting should be pretty consistent in all GIO headers
	now.


svn path=/trunk/; revision=7433
2008-09-02 19:05:58 +00:00
Matthias Clasen
001bb527b6 Forgotten commit
svn path=/trunk/; revision=7300
2008-08-04 17:19:30 +00:00
Matthias Clasen
a2b61b1e46 Add a GIcon implementation that can add an emblem to another icon.
2008-07-28  Matthias Clasen  <mclasen@redhat.com>

        * gemblemedicon.[hc]: Add a GIcon implementation that can
        add an emblem to another icon.

        * gio.h:
        * Makefile.am:
        * gio.symbols: Glue

        * gloadableicon.c:
        * gfileicon.c: Small documenatation additions.


svn path=/trunk/; revision=7263
2008-07-28 15:35:07 +00:00
Cody Russell
3d93bf6968 Moved all relevant typedefs into these files.
2008-07-01  Cody Russell  <bratsche@gnome.org>

        * gio/gioenums.h:
        * gio/giotypes.h:
	Moved all relevant typedefs into these	files.

        * gio/*.[ch]:
	Updated wrt added files.

        Split types into separate file	for easier maintainership. (#538564)


svn path=/trunk/; revision=7127
2008-07-01 06:32:35 +00:00
Alexander Larsson
e23140cbb4 Build test subdir after . Remove gdirectorymonitor.[ch]
2008-01-07  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
	Build test subdir after .
	Remove gdirectorymonitor.[ch]
	
        * gdirectorymonitor.[ch]:
        * gfilemonitor.c:
        * gfile.[ch]:
        * gio.h:
	Remove GDirectoryMonitor and make
	GFileMonitor the baseclass for both file and
	directory monitors. Lift the more generic
	rate limiting code from GDirectoryMonitor
	into GFileMonitor.
	
        * fam/fam-helper.c:
        * fam/gfamdirectorymonitor.[ch]:
        * inotify/ginotifydirectorymonitor.[ch]:
        * inotify/inotify-helper.c:
        * glocaldirectorymonitor.[ch]:
        * glocalfile.c:
        * gvolumemonitor.c:
	Update for the removed GDirectoryMonitor.
	
        * gmemoryoutputstream.c:
	Remove ununsed variable


svn path=/trunk/; revision=6262
2008-01-07 13:42:08 +00:00
David Zeuthen
f4add8f0fa Provide eject() on both GMount and GVolume and utility functions to guess
2007-12-14  David Zeuthen  <davidz@redhat.com>

	* Makefile.am:
	* gio.symbols:
	* gmount.c: (g_mount_get_uuid), (g_mount_can_eject),
	(g_mount_eject), (g_mount_eject_finish):
	* gmount.h:
	* gunionvolumemonitor.c: (g_union_volume_monitor_finalize),
	(get_volume_for_uuid), (get_mount_for_uuid),
	(g_union_volume_monitor_class_init),
	(get_default_native_type_with_exclude), (get_default_native_type),
	(get_native_type), (update_native_type),
	(g_union_volume_monitor_init), (_g_mount_get_for_mount_path):
	* gunixmount.c: (_g_unix_mount_new), (g_unix_mount_get_uuid),
	(g_unix_mount_can_eject), (eject_unmount_cb),
	(eject_unmount_read_error), (eject_unmount_do),
	(g_unix_mount_unmount), (g_unix_mount_eject),
	(g_unix_mount_eject_finish), (g_unix_mount_mount_iface_init):
	* gunixmounts.c: (g_unix_mount_guess_can_eject),
	(g_unix_mount_point_guess_can_eject):
	* gunixmounts.h:
	* gunixvolume.c: (_g_unix_volume_new), (g_unix_volume_get_uuid),
	(g_unix_volume_can_eject), (g_unix_volume_get_drive),
	(eject_mount_cb), (eject_mount_read_error), (eject_mount_do),
	(g_unix_volume_mount), (g_unix_volume_eject),
	(g_unix_volume_eject_finish), (g_unix_volume_volume_iface_init):
	* gunixvolumemonitor.c: (get_volume_for_uuid),
	(get_mount_for_uuid), (g_unix_volume_monitor_class_init),
	(update_mounts):
	* gvolume.c: (g_volume_get_uuid), (g_volume_can_eject),
	(g_volume_eject), (g_volume_eject_finish):
	* gvolume.h:
	* gvolumemonitor.c: (g_volume_monitor_get_volume_for_uuid),
	(g_volume_monitor_get_mount_for_uuid):
	* gvolumemonitor.h:

	Provide eject() on both GMount and GVolume and utility functions
	to guess whether a GUnixMountPoint or GUnixMountEntry should be
	ejected. Introduce the concept of UUID's and wire it into GVolume
	and GMount and provide API on GVolumeMonitor to find such
	instances. Also handle the case where an external
	GNativeVolumeMonitor fails to initialize. Lock around the
	_g_get_mount_for_mount_path() function such that volume monitor
	implementations won't have to do locking themselves.



svn path=/trunk/; revision=6140
2007-12-17 09:31:08 +00:00
Alexander Larsson
ced2927726 Only allow including <gio/gio.h> from apps
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * fam/Makefile.am:
        * gappinfo.h:
        * gasyncresult.h:
        * gbufferedinputstream.h:
        * gbufferedoutputstream.h:
        * gcancellable.h:
        * gcontenttype.h:
        * gdatainputstream.h:
        * gdataoutputstream.h:
        * gdesktopappinfo.h:
        * gdirectorymonitor.h:
        * gdrive.h:
        * gfile.h:
        * gfileattribute.h:
        * gfileenumerator.h:
        * gfileicon.h:
        * gfileinfo.h:
        * gfileinputstream.h:
        * gfilemonitor.h:
        * gfilenamecompleter.h:
        * gfileoutputstream.h:
        * gfilterinputstream.h:
        * gfilteroutputstream.h:
        * gicon.h:
        * ginputstream.h:
        * gio.h:
        * gioerror.h:
        * giomodule.h:
        * gioscheduler.h:
        * gloadableicon.h:
        * gmemoryinputstream.h:
        * gmemoryoutputstream.h:
        * gmount.h:
        * gmountoperation.h:
        * goutputstream.h:
        * gseekable.h:
        * gsimpleasyncresult.h:
        * gthemedicon.h:
        * gunixinputstream.h:
        * gunixmounts.h:
        * gunixoutputstream.h:
        * gvfs.h:
        * gvolume.h:
        * gvolumemonitor.h:
        * inotify/Makefile.am:
	Only allow including <gio/gio.h> from apps


svn path=/trunk/; revision=6117
2007-12-14 10:35:24 +00:00
Matthias Clasen
ff0acf0af6 Templates for enum registration
2007-11-30  Matthias Clasen <mclasen@redhat.com>

        * gioenumtypes.[hc].template: Templates for enum registration

        * Makefile.am: Generate gioenumtypes.[hc]

        * gio.h: Include gioenumtypes.h
        * gappinfo.h:
        * gfile.h: Add some explicit nicks.

        * gio.symbols: Add new symbols

        * pltcheck.sh: Adjust



svn path=/trunk/; revision=6002
2007-12-01 01:53:00 +00:00
Alexander Larsson
575c279d1c Don't include removed headers
2007-11-27  Alexander Larsson  <alexl@redhat.com>

	* gio.h:
	Don't include removed headers


svn path=/trunk/; revision=5957
2007-11-27 15:21:50 +00:00
Alexander Larsson
9bd5e0d8e2 Makefile.am Add catch-all gio.h header Don't install gdummyfile.h
2007-11-27  Alexander Larsson  <alexl@redhat.com>

	* Makefile.am
	* gio.h:
	Add catch-all gio.h header
	Don't install gdummyfile.h


svn path=/trunk/; revision=5950
2007-11-27 10:46:45 +00:00