/*
 * SPDX-License-Identifier: LGPL-2.0-or-later
 */

#ifndef CAMEL_IMAPX_NAMESPACE_H
#define CAMEL_IMAPX_NAMESPACE_H

#include <glib-object.h>

/* Standard GObject macros */
#define CAMEL_TYPE_IMAPX_NAMESPACE \
	(camel_imapx_namespace_get_type ())
#define CAMEL_IMAPX_NAMESPACE(obj) \
	(G_TYPE_CHECK_INSTANCE_CAST \
	((obj), CAMEL_TYPE_IMAPX_NAMESPACE, CamelIMAPXNamespace))
#define CAMEL_IMAPX_NAMESPACE_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_CAST \
	((cls), CAMEL_TYPE_IMAPX_NAMESPACE, CamelIMAPXNamespaceClass))
#define CAMEL_IS_IMAPX_NAMESPACE(obj) \
	(G_TYPE_CHECK_INSTANCE_TYPE \
	((obj), CAMEL_TYPE_IMAPX_NAMESPACE))
#define CAMEL_IS_IMAPX_NAMESPACE_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_TYPE \
	((cls), CAMEL_TYPE_IMAPX_NAMESPACE))
#define CAMEL_IMAPX_NAMESPACE_GET_CLASS(obj) \
	(G_TYPE_INSTANCE_GET_CLASS \
	((obj), CAMEL_TYPE_IMAPX_NAMESPACE, CamelIMAPXNamespaceClass))

G_BEGIN_DECLS

/**
 * CamelIMAPXNamespaceCategory:
 * @CAMEL_IMAPX_NAMESPACE_PERSONAL:
 *   Mailboxes belonging to the authenticated user.
 * @CAMEL_IMAPX_NAMESPACE_OTHER_USERS:
 *   Personal mailboxes belonging to other users.
 * @CAMEL_IMAPX_NAMESPACE_SHARED:
 *   Mailboxes intended to be shared amongst users.
 *
 * Refer to <ulink url="http://tools.ietf.org/html/rfc2342">RFC 2342</ulink>
 * for more detailed namespace class descriptions.
 **/
typedef enum {
	CAMEL_IMAPX_NAMESPACE_PERSONAL,
	CAMEL_IMAPX_NAMESPACE_OTHER_USERS,
	CAMEL_IMAPX_NAMESPACE_SHARED
} CamelIMAPXNamespaceCategory;

typedef struct _CamelIMAPXNamespace CamelIMAPXNamespace;
typedef struct _CamelIMAPXNamespaceClass CamelIMAPXNamespaceClass;
typedef struct _CamelIMAPXNamespacePrivate CamelIMAPXNamespacePrivate;

/**
 * CamelIMAPXNamespace:
 * Since: 3.12
 **/
struct _CamelIMAPXNamespace {
	/*< private >*/
	GObject parent;
	CamelIMAPXNamespacePrivate *priv;
};

struct _CamelIMAPXNamespaceClass {
	GObjectClass parent_class;

	/* Padding for future expansion */
	gpointer reserved[20];
};

GType		camel_imapx_namespace_get_type
					(void) G_GNUC_CONST;
CamelIMAPXNamespace *
		camel_imapx_namespace_new
					(CamelIMAPXNamespaceCategory category,
					 const gchar *prefix,
					 gchar separator);
gboolean	camel_imapx_namespace_equal
					(CamelIMAPXNamespace *namespace_a,
					 CamelIMAPXNamespace *namespace_b);
CamelIMAPXNamespaceCategory
		camel_imapx_namespace_get_category
					(CamelIMAPXNamespace *namespace_);
const gchar *	camel_imapx_namespace_get_prefix
					(CamelIMAPXNamespace *namespace_);
gchar		camel_imapx_namespace_get_separator
					(CamelIMAPXNamespace *namespace_);

G_END_DECLS

#endif /* CAMEL_IMAPX_NAMESPACE_H */

