1 /* 2 * Copyright (C) 2010, 2011 Igalia S.L. 3 * 4 * Contact: Iago Toral Quiroga <itoral@igalia.com> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public License 8 * as published by the Free Software Foundation; version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 * 02110-1301 USA 20 * 21 */ 22 23 #if !defined (_GRILO_H_INSIDE_) && !defined (GRILO_COMPILATION) 24 #error "Only <grilo.h> can be included directly." 25 #endif 26 27 #ifndef _GRL_ERROR_H_ 28 #define _GRL_ERROR_H_ 29 30 #define GRL_CORE_ERROR g_quark_from_static_string("grilo.error.general") 31 32 /** 33 * GrlCoreError: 34 * @GRL_CORE_ERROR_BROWSE_FAILED: The browse operation failed 35 * @GRL_CORE_ERROR_SEARCH_FAILED: The search operation failed 36 * @GRL_CORE_ERROR_SEARCH_NULL_UNSUPPORTED: Searching NULL-text is not supported 37 * @GRL_CORE_ERROR_QUERY_FAILED: The query operation failed 38 * @GRL_CORE_ERROR_RESOLVE_FAILED: The resolution operation failed 39 * @GRL_CORE_ERROR_MEDIA_NOT_FOUND: The media was not found 40 * @GRL_CORE_ERROR_STORE_FAILED: The store operation failed 41 * @GRL_CORE_ERROR_STORE_METADATA_FAILED: The store metadata operation failed 42 * @GRL_CORE_ERROR_REMOVE_FAILED: The removal operation failed 43 * @GRL_CORE_ERROR_MEDIA_FROM_URI_FAILED: The media from_uri operation failed 44 * @GRL_CORE_ERROR_CONFIG_LOAD_FAILED: Failed to load plugin configuration from a file 45 * @GRL_CORE_ERROR_CONFIG_FAILED: Failed to set configuration for plugin 46 * @GRL_CORE_ERROR_UNREGISTER_SOURCE_FAILED: Failed to unregister source 47 * @GRL_CORE_ERROR_LOAD_PLUGIN_FAILED: Failed to load plugin 48 * @GRL_CORE_ERROR_UNLOAD_PLUGIN_FAILED: Failed to unload plugin 49 * @GRL_CORE_ERROR_REGISTER_METADATA_KEY_FAILED: Failed to register metadata key 50 * @GRL_CORE_ERROR_NOTIFY_CHANGED_FAILED: Failed to start changed notifications 51 * @GRL_CORE_ERROR_OPERATION_CANCELLED: The operation was cancelled 52 * @GRL_CORE_ERROR_AUTHENTICATION_TOKEN: Invalid authentication token 53 * 54 * These constants identify all the available core errors 55 */ 56 typedef enum { 57 GRL_CORE_ERROR_BROWSE_FAILED = 1, 58 GRL_CORE_ERROR_SEARCH_FAILED, 59 GRL_CORE_ERROR_SEARCH_NULL_UNSUPPORTED, 60 GRL_CORE_ERROR_QUERY_FAILED, 61 GRL_CORE_ERROR_RESOLVE_FAILED, 62 GRL_CORE_ERROR_MEDIA_NOT_FOUND, 63 GRL_CORE_ERROR_STORE_FAILED, 64 GRL_CORE_ERROR_STORE_METADATA_FAILED, 65 GRL_CORE_ERROR_REMOVE_FAILED, 66 GRL_CORE_ERROR_MEDIA_FROM_URI_FAILED, 67 GRL_CORE_ERROR_CONFIG_LOAD_FAILED, 68 GRL_CORE_ERROR_CONFIG_FAILED, 69 GRL_CORE_ERROR_UNREGISTER_SOURCE_FAILED, 70 GRL_CORE_ERROR_LOAD_PLUGIN_FAILED, 71 GRL_CORE_ERROR_UNLOAD_PLUGIN_FAILED, 72 GRL_CORE_ERROR_REGISTER_METADATA_KEY_FAILED, 73 GRL_CORE_ERROR_NOTIFY_CHANGED_FAILED, 74 GRL_CORE_ERROR_OPERATION_CANCELLED, 75 GRL_CORE_ERROR_AUTHENTICATION_TOKEN 76 } GrlCoreError; 77 78 #endif /* _GRL_ERROR_H_ */ 79