File: test-sysinfo-extended-parsing.c

package info (click to toggle)
libgpod 0.8.3-23
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,824 kB
  • sloc: ansic: 26,992; sh: 11,435; cs: 1,400; python: 1,251; makefile: 448; cpp: 300; xml: 100
file content (27 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "itdb_sysinfo_extended_parser.h"

#include <glib.h>
#include <glib-object.h>

int main (int argc, char **argv)
{
    SysInfoIpodProperties *props;
    GError *error = NULL;
    if (argc != 2)
        return(1);

#if !GLIB_CHECK_VERSION(2, 36, 0)
    g_type_init ();
#endif
    props = itdb_sysinfo_extended_parse (argv[1], &error);
    if (props == NULL) {
        g_print ("Couldn't parse %s: %s\n", argv[1], error->message);
        return(2);
    }
    itdb_sysinfo_properties_dump (props);
    itdb_sysinfo_properties_free (props);
    props = NULL;

    return 0;
}