4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>
7 * Contact: Seokkyu Jang <seokkyu.jang@samsung.com>
8 * Contact: Sangil Yoon <si83.yoon@samsung.com>
10 * This library is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU Lesser General Public License as published by the
12 * Free Software Foundation; either version 2.1 of the License, or (at your option)
15 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation, Inc., 51
22 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 #include "xdgmime/src/xdgmime.h"
32 int main(int argc, char** argv)
36 printf("[usage] %s <filename> or <mimetype>\n",argv[0]);
40 printf("unaliased = %s\n",xdg_mime_unalias_mime_type(argv[1]));
43 res = xdg_mime_get_mime_type_for_file(argv[1],NULL);
44 if(strcmp(res,"application/octet-stream")==0)
45 res = xdg_mime_get_mime_type_from_file_name(argv[1]);
47 printf("%s has a mime-type of %s\n", argv[1], res);
52 /* vi: set ts=8 sts=8 sw=8: */