diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-04-09 08:04:41 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-04-09 08:04:41 +0200 |
commit | b010c1241227201581841122912f307d2311455a (patch) | |
tree | 1539f36f529ab39642c91d3e9a895bfd97233b77 /gir/gio-2.0.c | |
parent | 3668f3cef0b2d685150e5035e6b6d6c41841d721 (diff) | |
download | gobject-introspection-b010c1241227201581841122912f307d2311455a.tar.gz |
gir: Update annotations from glib git master
Diffstat (limited to 'gir/gio-2.0.c')
-rw-r--r-- | gir/gio-2.0.c | 72 |
1 files changed, 56 insertions, 16 deletions
diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c index b8500132..b0406b89 100644 --- a/gir/gio-2.0.c +++ b/gir/gio-2.0.c @@ -5091,10 +5091,11 @@ * instance and g_application_run() promptly returns. See the code * examples below. * - * If used, the expected form of an application identifier is very close - * to that of of a - * [D-Bus bus name](http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface). - * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator". + * If used, the expected form of an application identifier is the same as + * that of of a + * [D-Bus well-known bus name](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus). + * Examples include: `com.example.MyApp`, `org.example.internal_apps.Calculator`, + * `org._7_zip.Archiver`. * For details on valid application identifiers, see g_application_id_is_valid(). * * On Linux, the application identifier is claimed as a well-known bus name @@ -8854,9 +8855,16 @@ * of server sockets and helps you accept sockets from any of the * socket, either sync or async. * + * Add addresses and ports to listen on using g_socket_listener_add_address() + * and g_socket_listener_add_inet_port(). These will be listened on until + * g_socket_listener_close() is called. Dropping your final reference to the + * #GSocketListener will not cause g_socket_listener_close() to be called + * implicitly, as some references to the #GSocketListener may be held + * internally. + * * If you want to implement a network server, also look at #GSocketService - * and #GThreadedSocketService which are subclass of #GSocketListener - * that makes this even easier. + * and #GThreadedSocketService which are subclasses of #GSocketListener + * that make this even easier. * * Since: 2.22 */ @@ -11874,8 +11882,8 @@ * The result is cached after it is generated the first time, and * the function is thread-safe. * - * Returns: (transfer none): an object implementing - * @extension_point, or %NULL if there are no usable + * Returns: (transfer none): the type to instantiate to implement + * @extension_point, or %G_TYPE_INVALID if there are no usable * implementations. */ @@ -13675,23 +13683,47 @@ * A valid ID is required for calls to g_application_new() and * g_application_set_application_id(). * + * Application identifiers follow the same format as + * [D-Bus well-known bus names](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus). * For convenience, the restrictions on application identifiers are * reproduced here: * - * - Application identifiers must contain only the ASCII characters - * "[A-Z][a-z][0-9]_-." and must not begin with a digit. + * - Application identifiers are composed of 1 or more elements separated by a + * period (`.`) character. All elements must contain at least one character. * - * - Application identifiers must contain at least one '.' (period) - * character (and thus at least two elements). + * - Each element must only contain the ASCII characters `[A-Z][a-z][0-9]_-`, + * with `-` discouraged in new application identifiers. Each element must not + * begin with a digit. * - * - Application identifiers must not begin or end with a '.' (period) - * character. + * - Application identifiers must contain at least one `.` (period) character + * (and thus at least two elements). * - * - Application identifiers must not contain consecutive '.' (period) - * characters. + * - Application identifiers must not begin with a `.` (period) character. * * - Application identifiers must not exceed 255 characters. * + * Note that the hyphen (`-`) character is allowed in application identifiers, + * but is problematic or not allowed in various specifications and APIs that + * refer to D-Bus, such as + * [Flatpak application IDs](http://docs.flatpak.org/en/latest/introduction.html#identifiers), + * the + * [`DBusActivatable` interface in the Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus), + * and the convention that an application's "main" interface and object path + * resemble its application identifier and bus name. To avoid situations that + * require special-case handling, it is recommended that new application + * identifiers consistently replace hyphens with underscores. + * + * Like D-Bus interface names, application identifiers should start with the + * reversed DNS domain name of the author of the interface (in lower-case), and + * it is conventional for the rest of the application identifier to consist of + * words run together, with initial capital letters. + * + * As with D-Bus interface names, if the author's DNS domain name contains + * hyphen/minus characters they should be replaced by underscores, and if it + * contains leading digits they should be escaped by prepending an underscore. + * For example, if the owner of 7-zip.org used an application identifier for an + * archiving application, it might be named `org._7_zip.Archiver`. + * * Returns: %TRUE if @application_id is valid */ @@ -36978,6 +37010,10 @@ * requesting a binding to port 0 (ie: "any port"). This address, if * requested, belongs to the caller and must be freed. * + * Call g_socket_listener_close() to stop listening on @address; this will not + * be done automatically when you drop your final reference to @listener, as + * references may be held internally. + * * Returns: %TRUE on success, %FALSE on error. * Since: 2.22 */ @@ -37022,6 +37058,10 @@ * useful if you're listening on multiple addresses and do * different things depending on what address is connected to. * + * Call g_socket_listener_close() to stop listening on @port; this will not + * be done automatically when you drop your final reference to @listener, as + * references may be held internally. + * * Returns: %TRUE on success, %FALSE on error. * Since: 2.22 */ |