2
* Copyright (C) 2009 Jonathan Matthew <jonathan@d14n.org>
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
#include "mediaplayerid.h"
23
main (int argc, char **argv)
29
mpid_enable_debug (TRUE);
30
device = mpid_device_new (argv[1]);
32
switch (device->error) {
35
case MPID_ERROR_NO_DEVICE_PATH:
36
g_print ("unable to get device path\n");
38
case MPID_ERROR_MECHANISM_FAILED:
39
g_print ("device database mechanism failed\n");
41
case MPID_ERROR_NOT_MEDIA_PLAYER:
42
g_print ("device is not a media player\n");
44
case MPID_ERROR_DEVICE_INFO_MISSING:
45
g_print ("device info is missing from database\n");
49
g_object_unref (device);