00001 00025 /* 00026 * The following code has been adapted from gnome-desktop-item.[ch], 00027 * as found on gnome-desktop-2.8.1. 00028 * 00029 * Copyright (C) 2004 by Alceste Scalas <alceste.scalas@gmx.net>. 00030 * 00031 * Original copyright notice: 00032 * 00033 * Copyright (C) 1999, 2000 Red Hat Inc. 00034 * Copyright (C) 2001 Sid Vicious 00035 * All rights reserved. 00036 * 00037 * This file is part of the Gnome Library. 00038 * 00039 * The Gnome Library is free software; you can redistribute it and/or 00040 * modify it under the terms of the GNU Library General Public License as 00041 * published by the Free Software Foundation; either version 2 of the 00042 * License, or (at your option) any later version. 00043 * 00044 * The Gnome Library is distributed in the hope that it will be useful, 00045 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00046 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00047 * Library General Public License for more details. 00048 * 00049 * You should have received a copy of the GNU Library General Public 00050 * License along with the Gnome Library; see the file COPYING.LIB. If not, 00051 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00052 * Boston, MA 02111-1307, USA. 00053 */ 00054 00055 #ifndef _PURPLE_DESKTOP_ITEM_H_ 00056 #define _PURPLE_DESKTOP_ITEM_H_ 00057 00058 #include <glib.h> 00059 #include <glib-object.h> 00060 00061 G_BEGIN_DECLS 00062 00063 typedef enum { 00064 PURPLE_DESKTOP_ITEM_TYPE_NULL = 0 /* This means its NULL, that is, not 00065 * set */, 00066 PURPLE_DESKTOP_ITEM_TYPE_OTHER /* This means it's not one of the below 00067 strings types, and you must get the 00068 Type attribute. */, 00069 00070 /* These are the standard compliant types: */ 00071 PURPLE_DESKTOP_ITEM_TYPE_APPLICATION, 00072 PURPLE_DESKTOP_ITEM_TYPE_LINK, 00073 PURPLE_DESKTOP_ITEM_TYPE_FSDEVICE, 00074 PURPLE_DESKTOP_ITEM_TYPE_MIME_TYPE, 00075 PURPLE_DESKTOP_ITEM_TYPE_DIRECTORY, 00076 PURPLE_DESKTOP_ITEM_TYPE_SERVICE, 00077 PURPLE_DESKTOP_ITEM_TYPE_SERVICE_TYPE 00078 } PurpleDesktopItemType; 00079 00080 typedef struct _PurpleDesktopItem PurpleDesktopItem; 00081 00082 #define PURPLE_TYPE_DESKTOP_ITEM (purple_desktop_item_get_type ()) 00083 GType purple_desktop_item_get_type (void); 00084 00085 /* standard */ 00086 #define PURPLE_DESKTOP_ITEM_ENCODING "Encoding" /* string */ 00087 #define PURPLE_DESKTOP_ITEM_VERSION "Version" /* numeric */ 00088 #define PURPLE_DESKTOP_ITEM_NAME "Name" /* localestring */ 00089 #define PURPLE_DESKTOP_ITEM_GENERIC_NAME "GenericName" /* localestring */ 00090 #define PURPLE_DESKTOP_ITEM_TYPE "Type" /* string */ 00091 #define PURPLE_DESKTOP_ITEM_FILE_PATTERN "FilePattern" /* regexp(s) */ 00092 #define PURPLE_DESKTOP_ITEM_TRY_EXEC "TryExec" /* string */ 00093 #define PURPLE_DESKTOP_ITEM_NO_DISPLAY "NoDisplay" /* boolean */ 00094 #define PURPLE_DESKTOP_ITEM_COMMENT "Comment" /* localestring */ 00095 #define PURPLE_DESKTOP_ITEM_EXEC "Exec" /* string */ 00096 #define PURPLE_DESKTOP_ITEM_ACTIONS "Actions" /* strings */ 00097 #define PURPLE_DESKTOP_ITEM_ICON "Icon" /* string */ 00098 #define PURPLE_DESKTOP_ITEM_MINI_ICON "MiniIcon" /* string */ 00099 #define PURPLE_DESKTOP_ITEM_HIDDEN "Hidden" /* boolean */ 00100 #define PURPLE_DESKTOP_ITEM_PATH "Path" /* string */ 00101 #define PURPLE_DESKTOP_ITEM_TERMINAL "Terminal" /* boolean */ 00102 #define PURPLE_DESKTOP_ITEM_TERMINAL_OPTIONS "TerminalOptions" /* string */ 00103 #define PURPLE_DESKTOP_ITEM_SWALLOW_TITLE "SwallowTitle" /* string */ 00104 #define PURPLE_DESKTOP_ITEM_SWALLOW_EXEC "SwallowExec" /* string */ 00105 #define PURPLE_DESKTOP_ITEM_MIME_TYPE "MimeType" /* regexp(s) */ 00106 #define PURPLE_DESKTOP_ITEM_PATTERNS "Patterns" /* regexp(s) */ 00107 #define PURPLE_DESKTOP_ITEM_DEFAULT_APP "DefaultApp" /* string */ 00108 #define PURPLE_DESKTOP_ITEM_DEV "Dev" /* string */ 00109 #define PURPLE_DESKTOP_ITEM_FS_TYPE "FSType" /* string */ 00110 #define PURPLE_DESKTOP_ITEM_MOUNT_POINT "MountPoint" /* string */ 00111 #define PURPLE_DESKTOP_ITEM_READ_ONLY "ReadOnly" /* boolean */ 00112 #define PURPLE_DESKTOP_ITEM_UNMOUNT_ICON "UnmountIcon" /* string */ 00113 #define PURPLE_DESKTOP_ITEM_SORT_ORDER "SortOrder" /* strings */ 00114 #define PURPLE_DESKTOP_ITEM_URL "URL" /* string */ 00115 #define PURPLE_DESKTOP_ITEM_DOC_PATH "X-GNOME-DocPath" /* string */ 00116 00124 PurpleDesktopItem *purple_desktop_item_new_from_file (const char *filename); 00125 00138 PurpleDesktopItemType purple_desktop_item_get_entry_type (const PurpleDesktopItem *item); 00139 00148 const char *purple_desktop_item_get_string (const PurpleDesktopItem *item, 00149 const char *attr); 00150 00159 PurpleDesktopItem *purple_desktop_item_copy (const PurpleDesktopItem *item); 00160 00167 void purple_desktop_item_unref (PurpleDesktopItem *item); 00168 00169 G_END_DECLS 00170 00171 #endif /* _PURPLE_DESKTOP_ITEM_H_ */