summaryrefslogtreecommitdiffstats
path: root/examples/agent/pkagentexample.cpp
blob: db7515cfdbf0275f335a5ace3939dfc6cad5ab5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1

#include <polkitagent/polkitagent.h>

#include "pkagentexample.h"
#include <unistd.h>
#include <tqsessionmanager.h>

#include "polkit-tqt-subject.h"

PkAgentExample::PkAgentExample(int argc, char **argv) : TQApplication(argc, argv)
{
  PolkitTQt::UnixSessionSubject session(getpid());
  m_listener.registerListener(session, "/org/tqt/PolicyKit1/AuthenticationAgent");
}

void PkAgentExample::commitData(TQSessionManager &sm)
{
  sm.setRestartHint(TQSessionManager::RestartNever);
}

#include "pkagentexample.moc"