Sha256: 9df95334ed71f28b1181c2ec7790d56a402527af572b80ca59e9ab3237e3ec2a

Contents?: true

Size: 1.75 KB

Versions: 2

Compression:

Stored size: 1.75 KB

Contents

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>server_info (Notify)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre>/*
 * call-seq:
 *      server_info
 *
 * Queries the server for its information (name, vendor, server version,
 * notification version)
 *
 * Returns FALSE if there were errors, an Hash otherwise
 *
 * example:
 *
 *      h = Notify.server_info
 *      p h[:name]                #print the product name of the server
 *      p h[:vendor]              #print the vendor
 *      p h[:version]             #print the server version
 *      p h[:spec_version]        #print the specification version supported
 */
static VALUE
_wrap_notify_get_server_info(VALUE self)
{
  gchar *serv_name = NULL,
           *vendor = NULL,
           *serv_version = NULL,
           *spec_vers = NULL;
  VALUE rb_info;

  if(!notify_get_server_info(&amp;serv_name, &amp;vendor, &amp;serv_version, &amp;spec_vers))
    return Qfalse;
  else
  {
    rb_info = rb_hash_new();
    rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;name&quot;)), rb_str_new2(serv_name));
    rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;vendor&quot;)), rb_str_new2(vendor));
    rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;version&quot;)), rb_str_new2(serv_version));
    rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;spec_version&quot;)), rb_str_new2(spec_vers));

    g_free(serv_name);
    g_free(vendor);
    g_free(serv_version);
    g_free(spec_vers);
   }

  return rb_info;
}</pre>
</body>
</html>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-libnotify-0.4.1.1 doc/classes/Notify.src/M000006.html
ruby-libnotify-0.4.1 doc/classes/Notify.src/M000006.html