Debian Codegraph @

cvsservice/sshagent.h

raw symbols SCIP
1 /*
2 * Copyright (c) 2003 Christian Loose <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 *
19 */
20
21 #ifndef SSHAGENT_H
22 #define SSHAGENT_H
23
24 #include <qobject.h>
25 #include <qstring.h>
26 #include <qstringlist.h>
27
28 class KProcess;
29
30 class SshAgent : public QObject
31 {
32 Q_OBJECT
33
34 public:
35 explicit SshAgent(QObject *parent = nullptr);
36 ~SshAgent() override;
37
38 bool querySshAgent();
39 bool addSshIdentities();
40 void killSshAgent();
41
42 bool isRunning() const
43 {
44 return m_isRunning;
45 }
46 QString pid() const
47 {
48 return m_pid;
49 }
50 QString authSock() const
51 {
52 return m_authSock;
53 }
54
55 private Q_SLOTS:
56 void slotProcessFinished();
57 void slotReceivedOutput();
58
59 private:
60 bool startSshAgent();
61
62 QStringList m_outputLines;
63
64 KProcess *m_agentProcess;
65
66 static bool m_isRunning;
67 static bool m_isOurAgent;
68 static QString m_authSock;
69 static QString m_pid;
70 };
71
72 #endif