summaryrefslogtreecommitdiff
path: root/glib/src/miscutils.hg
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2019-10-07 08:50:24 +0000
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2019-10-07 08:50:24 +0000
commit715a6c8f7572f2b88350ebb19b69181178bad1b7 (patch)
treed309e98bdc4b063f61b6075ea83a874e2f4ebdb0 /glib/src/miscutils.hg
parent66a9e11b35b10d97a6cfdbcce00bb0470f9db9ae (diff)
parent3c8666f81441eb3627cfb1dca257295331813392 (diff)
downloadglibmm-715a6c8f7572f2b88350ebb19b69181178bad1b7.tar.gz
Merge branch 'get_host_name' into 'master'
Add Glib::get_host_name() Closes #58 See merge request GNOME/glibmm!15
Diffstat (limited to 'glib/src/miscutils.hg')
-rw-r--r--glib/src/miscutils.hg19
1 files changed, 19 insertions, 0 deletions
diff --git a/glib/src/miscutils.hg b/glib/src/miscutils.hg
index d1748cfe..e223264c 100644
--- a/glib/src/miscutils.hg
+++ b/glib/src/miscutils.hg
@@ -163,6 +163,25 @@ std::string get_user_name();
*/
std::string get_real_name();
+/** Return a name for the machine.
+ *
+ * The returned name is not necessarily a fully-qualified domain name,
+ * or even present in DNS or some other name service at all. It need
+ * not even be unique on your local network or site, but usually it
+ * is. Callers should not rely on the return value having any specific
+ * properties like uniqueness for security purposes. Even if the name
+ * of the machine is changed while an application is running, the
+ * return value from this function does not change. The returned
+ * string is owned by GLib and should not be modified or freed. If no
+ * name can be determined, a default fixed string "localhost" is
+ * returned.
+ *
+ * @return The host name of the machine.
+ *
+ * @newin{2,64}
+ */
+std::string get_host_name();
+
/** Gets the current user's home directory.
* @return The current user's home directory or an empty string if not defined.
*/