Blame src/cups-pk-helper-mechanism.h

Packit 41e083
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
Packit 41e083
 * vim: set et ts=8 sw=8:
Packit 41e083
 *
Packit 41e083
 * Copyright (C) 2008 Novell, Inc.
Packit 41e083
 *
Packit 41e083
 * Authors: Vincent Untz
Packit 41e083
 *
Packit 41e083
 * This program is free software; you can redistribute it and/or modify
Packit 41e083
 * it under the terms of the GNU General Public License as published by
Packit 41e083
 * the Free Software Foundation; either version 2 of the License, or
Packit 41e083
 * (at your option) any later version.
Packit 41e083
 *
Packit 41e083
 * This program is distributed in the hope that it will be useful,
Packit 41e083
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 41e083
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 41e083
 * GNU General Public License for more details.
Packit 41e083
 *
Packit 41e083
 * You should have received a copy of the GNU General Public License
Packit 41e083
 * along with this program; if not, write to the Free Software
Packit 41e083
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Packit 41e083
 *
Packit 41e083
 * The code is originally based on gnome-clock-applet-mechanism.h, which
Packit 41e083
 * is under the same license and with the following copyright:
Packit 41e083
 *
Packit 41e083
 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
Packit 41e083
 *
Packit 41e083
 */
Packit 41e083
Packit 41e083
#ifndef CPH_MECHANISM_H
Packit 41e083
#define CPH_MECHANISM_H
Packit 41e083
Packit 41e083
#include <glib-object.h>
Packit 41e083
#include <gio/gio.h>
Packit 41e083
Packit 41e083
#include "cph-iface-mechanism.h"
Packit 41e083
Packit 41e083
G_BEGIN_DECLS
Packit 41e083
Packit 41e083
#define CPH_TYPE_MECHANISM         (cph_mechanism_get_type ())
Packit 41e083
#define CPH_MECHANISM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), CPH_TYPE_MECHANISM, CphMechanism))
Packit 41e083
#define CPH_MECHANISM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), CPH_TYPE_MECHANISM, CphMechanismClass))
Packit 41e083
#define CPH_IS_MECHANISM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), CPH_TYPE_MECHANISM))
Packit 41e083
#define CPH_IS_MECHANISM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), CPH_TYPE_MECHANISM))
Packit 41e083
#define CPH_MECHANISM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CPH_TYPE_MECHANISM, CphMechanismClass))
Packit 41e083
Packit 41e083
typedef struct CphMechanismPrivate CphMechanismPrivate;
Packit 41e083
Packit 41e083
typedef struct
Packit 41e083
{
Packit 41e083
        CphIfaceMechanismSkeleton  parent;
Packit 41e083
        CphMechanismPrivate       *priv;
Packit 41e083
} CphMechanism;
Packit 41e083
Packit 41e083
typedef struct
Packit 41e083
{
Packit 41e083
        CphIfaceMechanismSkeletonClass parent_class;
Packit 41e083
Packit 41e083
        /* signals */
Packit 41e083
Packit 41e083
        void (*called)    (CphMechanism *mechanism);
Packit 41e083
} CphMechanismClass;
Packit 41e083
Packit 41e083
typedef enum
Packit 41e083
{
Packit 41e083
        CPH_MECHANISM_ERROR_GENERAL = 0,
Packit 41e083
        CPH_MECHANISM_ERROR_NOT_PRIVILEGED,
Packit 41e083
        CPH_MECHANISM_NUM_ERRORS
Packit 41e083
} CphMechanismError;
Packit 41e083
Packit 41e083
#define CPH_MECHANISM_ERROR cph_mechanism_error_quark ()
Packit 41e083
Packit 41e083
GQuark         cph_mechanism_error_quark (void);
Packit 41e083
GType          cph_mechanism_get_type    (void);
Packit 41e083
Packit 41e083
CphMechanism  *cph_mechanism_new         (void);
Packit 41e083
Packit 41e083
gboolean       cph_mechanism_register    (CphMechanism     *mechanism,
Packit 41e083
                                          GDBusConnection  *connection,
Packit 41e083
                                          const char       *object_path,
Packit 41e083
                                          GError          **error);
Packit 41e083
Packit 41e083
G_END_DECLS
Packit 41e083
Packit 41e083
#endif /* CPH_MECHANISM_H */