Blame src/dbus/abrt-polkit.h

Packit 8ea169
/*
Packit 8ea169
  Copyright (C) 2012  ABRT team
Packit 8ea169
Packit 8ea169
  This program is free software; you can redistribute it and/or modify
Packit 8ea169
  it under the terms of the GNU General Public License as published by
Packit 8ea169
  the Free Software Foundation; either version 2 of the License, or
Packit 8ea169
  (at your option) any later version.
Packit 8ea169
Packit 8ea169
  This program is distributed in the hope that it will be useful,
Packit 8ea169
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 8ea169
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 8ea169
  GNU General Public License for more details.
Packit 8ea169
Packit 8ea169
  You should have received a copy of the GNU General Public License along
Packit 8ea169
  with this program; if not, write to the Free Software Foundation, Inc.,
Packit 8ea169
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Packit 8ea169
*/
Packit 8ea169
#ifndef ABRT_POLKIT_H
Packit 8ea169
#define ABRT_POLKIT_H
Packit 8ea169
Packit 8ea169
#include <sys/types.h>
Packit 8ea169
#include <unistd.h>
Packit 8ea169
Packit 8ea169
typedef enum {
Packit 8ea169
/* Authorization status is unknown */
Packit 8ea169
    PolkitUnknown = 0x0,
Packit 8ea169
    /* Subject is authorized for the action */
Packit 8ea169
    PolkitYes = 0x01,
Packit 8ea169
    /* Subject is not authorized for the action */
Packit 8ea169
    PolkitNo = 0x02,
Packit 8ea169
    /* Challenge is needed for this action, only when flag is
Packit 8ea169
     * POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE */
Packit 8ea169
    PolkitChallenge = 0x03
Packit 8ea169
} PolkitResult;
Packit 8ea169
Packit 8ea169
PolkitResult polkit_check_authorization_dname(const char *dbus_name, const char *action_id);
Packit 8ea169
PolkitResult polkit_check_authorization_pid(pid_t pid, const char *action_id);
Packit 8ea169
Packit 8ea169
#endif