libmalcontent: Move MctAppFilterError to MctManagerError
This isn’t an API break, as compatibility defines are in place; and the error code values are the same, so it shouldn’t be an ABI break. The string value of the error quark has changed, but nobody should be comparing that against a value which hasn’t come out of libmalcontent, so changing it should be OK. This is along the same lines as the previous commit: we don’t need one error domain per property of an `MctManager`, so reduce the potential for future duplication by renaming it now. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
acf2738d56
commit
300b5a624f
5 changed files with 76 additions and 57 deletions
|
@ -29,31 +29,6 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* MctAppFilterError:
|
||||
* @MCT_APP_FILTER_ERROR_INVALID_USER: Given user ID doesn’t exist
|
||||
* @MCT_APP_FILTER_ERROR_PERMISSION_DENIED: Not authorized to query the app
|
||||
* filter for the given user
|
||||
* @MCT_APP_FILTER_ERROR_INVALID_DATA: The data stored in the app filter for
|
||||
* a user is inconsistent or invalid
|
||||
* @MCT_APP_FILTER_ERROR_DISABLED: App filtering is disabled for all users (Since: 0.3.0)
|
||||
*
|
||||
* Errors relating to #MctAppFilter instances, which can be returned by
|
||||
* mct_manager_get_app_filter_async() (for example).
|
||||
*
|
||||
* Since: 0.2.0
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
MCT_APP_FILTER_ERROR_INVALID_USER,
|
||||
MCT_APP_FILTER_ERROR_PERMISSION_DENIED,
|
||||
MCT_APP_FILTER_ERROR_INVALID_DATA,
|
||||
MCT_APP_FILTER_ERROR_DISABLED,
|
||||
} MctAppFilterError;
|
||||
|
||||
GQuark mct_app_filter_error_quark (void);
|
||||
#define MCT_APP_FILTER_ERROR mct_app_filter_error_quark ()
|
||||
|
||||
/**
|
||||
* MctAppFilterOarsValue:
|
||||
* @MCT_APP_FILTER_OARS_VALUE_UNKNOWN: Unknown value for the given
|
||||
|
@ -197,4 +172,16 @@ void mct_app_filter_builder_set_allow_user_installation (MctAppFilterBuilder *
|
|||
void mct_app_filter_builder_set_allow_system_installation (MctAppFilterBuilder *builder,
|
||||
gboolean allow_system_installation);
|
||||
|
||||
#include <libmalcontent/manager.h>
|
||||
|
||||
/* FIXME: Eventually deprecate these compatibility fallbacks. */
|
||||
typedef MctManagerError MctAppFilterError;
|
||||
#define MCT_APP_FILTER_ERROR_INVALID_USER MCT_MANAGER_ERROR_INVALID_USER
|
||||
#define MCT_APP_FILTER_ERROR_PERMISSION_DENIED MCT_MANAGER_ERROR_PERMISSION_DENIED
|
||||
#define MCT_APP_FILTER_ERROR_INVALID_DATA MCT_MANAGER_ERROR_INVALID_DATA
|
||||
#define MCT_APP_FILTER_ERROR_DISABLED MCT_MANAGER_ERROR_DISABLED
|
||||
|
||||
GQuark mct_app_filter_error_quark (void);
|
||||
#define MCT_APP_FILTER_ERROR mct_app_filter_error_quark ()
|
||||
|
||||
G_END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue