GpgFrontend-Doxygen/docs/latex/classGpgFrontend_1_1GpgKeyManager.tex

211 lines
12 KiB
TeX

\hypertarget{classGpgFrontend_1_1GpgKeyManager}{}\doxysection{Gpg\+Frontend\+::Gpg\+Key\+Manager Class Reference}
\label{classGpgFrontend_1_1GpgKeyManager}\index{GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}}
Inheritance diagram for Gpg\+Frontend\+::Gpg\+Key\+Manager\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{classGpgFrontend_1_1GpgKeyManager__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for Gpg\+Frontend\+::Gpg\+Key\+Manager\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classGpgFrontend_1_1GpgKeyManager__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{structGpgFrontend_1_1GpgKeyManager_1_1AutomatonHandelStruct}{Automaton\+Handel\+Struct}}
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{classGpgFrontend_1_1GpgKeyManager_a210b717fd8ee63b064d77f32b0df4c5d}{Gpg\+Key\+Manager}} (int channel=\mbox{\hyperlink{classGpgFrontend_1_1SingletonFunctionObject_a50e2b3794d6553f4231eaec72d9d0a50}{Singleton\+Function\+Object\+::\+Get\+Default\+Channel}}())
\begin{DoxyCompactList}\small\item\em Construct a new Gpg Key Manager object. \end{DoxyCompactList}\item
bool \mbox{\hyperlink{classGpgFrontend_1_1GpgKeyManager_a12138780c53add7589f78f056019e5e0}{Sign\+Key}} (const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Key}} \&target, Key\+Args\+List \&keys, const std\+::string \&uid, const std\+::unique\+\_\+ptr$<$ boost\+::posix\+\_\+time\+::ptime $>$ \&expires)
\begin{DoxyCompactList}\small\item\em Sign a key pair(actually a certain uid) \end{DoxyCompactList}\item
bool \mbox{\hyperlink{classGpgFrontend_1_1GpgKeyManager_aa2c0e804db1c4aaf3b861ee5ab54ebd8}{Rev\+Sign}} (const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Frontend\+::\+Gpg\+Key}} \&key, const Gpg\+Frontend\+::\+Sign\+Id\+Args\+List\+Ptr \&signature\+\_\+id)
\item
bool \mbox{\hyperlink{classGpgFrontend_1_1GpgKeyManager_a1625abfbff168c476e76fa9425a6c37d}{Set\+Expire}} (const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Key}} \&key, std\+::unique\+\_\+ptr$<$ \mbox{\hyperlink{classGpgFrontend_1_1GpgSubKey}{Gpg\+Sub\+Key}} $>$ \&subkey, std\+::unique\+\_\+ptr$<$ boost\+::posix\+\_\+time\+::ptime $>$ \&expires)
\begin{DoxyCompactList}\small\item\em Set the Expire object. \end{DoxyCompactList}\item
bool \mbox{\hyperlink{classGpgFrontend_1_1GpgKeyManager_a0d4006daeccd574ddcc9e6c621739c48}{Set\+Owner\+Trust\+Level}} (const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Key}} \&key, int trust\+\_\+level)
\end{DoxyCompactItemize}
\doxysubsection*{Private Types}
\begin{DoxyCompactItemize}
\item
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_a4fea67ab4a5c4e768aa1b55f23f3c8b7}\label{classGpgFrontend_1_1GpgKeyManager_a4fea67ab4a5c4e768aa1b55f23f3c8b7}}
using {\bfseries Command} = std\+::string
\item
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_abcbe4e2e72ffa42fd5c2897a9418b4f7}\label{classGpgFrontend_1_1GpgKeyManager_abcbe4e2e72ffa42fd5c2897a9418b4f7}}
using {\bfseries Automaton\+State} = enum \{ START, COMMAND, VALUE, REALLY\+\_\+\+ULTIMATE, SAVE, ERROR, QUIT, \}
\item
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_abbd0d9893967a342b0f1062a856d0647}\label{classGpgFrontend_1_1GpgKeyManager_abbd0d9893967a342b0f1062a856d0647}}
using {\bfseries Automaton\+Action\+Handler} = std\+::function$<$ Command(\mbox{\hyperlink{structGpgFrontend_1_1GpgKeyManager_1_1AutomatonHandelStruct}{Automaton\+Handel\+Struct}} \&, Automaton\+State)$>$
\item
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_a60a8636d3463f0c1a17e6f384fed0985}\label{classGpgFrontend_1_1GpgKeyManager_a60a8636d3463f0c1a17e6f384fed0985}}
using {\bfseries Automaton\+Next\+State\+Handler} = std\+::function$<$ Automaton\+State(Automaton\+State, std\+::string, std\+::string)$>$
\end{DoxyCompactItemize}
\doxysubsection*{Static Private Member Functions}
\begin{DoxyCompactItemize}
\item
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_af0709924bd70fee6a9ea4efbf85b689d}\label{classGpgFrontend_1_1GpgKeyManager_af0709924bd70fee6a9ea4efbf85b689d}}
static gpgme\+\_\+error\+\_\+t {\bfseries interactor\+\_\+cb\+\_\+fnc} (void $\ast$handle, const char $\ast$status, const char $\ast$args, int fd)
\end{DoxyCompactItemize}
\doxysubsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{classGpgFrontend_1_1GpgContext}{Gpg\+Context}} \& {\bfseries ctx\+\_\+}
\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}
\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_a210b717fd8ee63b064d77f32b0df4c5d}\label{classGpgFrontend_1_1GpgKeyManager_a210b717fd8ee63b064d77f32b0df4c5d}}
\index{GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}!GpgKeyManager@{GpgKeyManager}}
\index{GpgKeyManager@{GpgKeyManager}!GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}}
\doxysubsubsection{\texorpdfstring{GpgKeyManager()}{GpgKeyManager()}}
{\footnotesize\ttfamily Gpg\+Frontend\+::\+Gpg\+Key\+Manager\+::\+Gpg\+Key\+Manager (\begin{DoxyParamCaption}\item[{int}]{channel = {\ttfamily \mbox{\hyperlink{classGpgFrontend_1_1SingletonFunctionObject_a50e2b3794d6553f4231eaec72d9d0a50}{Singleton\+Function\+Object\+::\+Get\+Default\+Channel}}()} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}
Construct a new Gpg Key Manager object.
\begin{DoxyParams}{Parameters}
{\em channel} & Copyright (C) 2021 Saturneric\\
\hline
\end{DoxyParams}
This file is part of \mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}}.
\mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}} is free software\+: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with \mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}}. If not, see \href{https://www.gnu.org/licenses/}{\texttt{ https\+://www.\+gnu.\+org/licenses/}}.
The initial version of the source code is inherited from the gpg4usb project, which is under GPL-\/3.\+0-\/or-\/later.
All the source code of \mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}} was modified and released by Saturneric\href{mailto:eric@bktus.com}{\texttt{ eric@bktus.\+com}} starting on May 12, 2021.
SPDX-\/\+License-\/\+Identifier\+: GPL-\/3.\+0-\/or-\/later
\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_aa2c0e804db1c4aaf3b861ee5ab54ebd8}\label{classGpgFrontend_1_1GpgKeyManager_aa2c0e804db1c4aaf3b861ee5ab54ebd8}}
\index{GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}!RevSign@{RevSign}}
\index{RevSign@{RevSign}!GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}}
\doxysubsubsection{\texorpdfstring{RevSign()}{RevSign()}}
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+Gpg\+Key\+Manager\+::\+Rev\+Sign (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Frontend\+::\+Gpg\+Key}} \&}]{key, }\item[{const Gpg\+Frontend\+::\+Sign\+Id\+Args\+List\+Ptr \&}]{signature\+\_\+id }\end{DoxyParamCaption})}
\begin{DoxyParams}{Parameters}
{\em key} & \\
\hline
{\em signature\+\_\+id} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true
false
\end{DoxyReturn}
References Gpg\+Frontend\+::check\+\_\+gpg\+\_\+error(), Gpg\+Frontend\+::check\+\_\+gpg\+\_\+error\+\_\+2\+\_\+err\+\_\+code(), and Gpg\+Frontend\+::\+Singleton\+Function\+Object$<$ Gpg\+Key\+Getter $>$\+::\+Get\+Instance().
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_a1625abfbff168c476e76fa9425a6c37d}\label{classGpgFrontend_1_1GpgKeyManager_a1625abfbff168c476e76fa9425a6c37d}}
\index{GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}!SetExpire@{SetExpire}}
\index{SetExpire@{SetExpire}!GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}}
\doxysubsubsection{\texorpdfstring{SetExpire()}{SetExpire()}}
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+Gpg\+Key\+Manager\+::\+Set\+Expire (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Key}} \&}]{key, }\item[{std\+::unique\+\_\+ptr$<$ \mbox{\hyperlink{classGpgFrontend_1_1GpgSubKey}{Gpg\+Sub\+Key}} $>$ \&}]{subkey, }\item[{std\+::unique\+\_\+ptr$<$ boost\+::posix\+\_\+time\+::ptime $>$ \&}]{expires }\end{DoxyParamCaption})}
Set the Expire object.
\begin{DoxyParams}{Parameters}
{\em key} & \\
\hline
{\em subkey} & \\
\hline
{\em expires} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true
false
\end{DoxyReturn}
References Gpg\+Frontend\+::check\+\_\+gpg\+\_\+error(), and Gpg\+Frontend\+::check\+\_\+gpg\+\_\+error\+\_\+2\+\_\+err\+\_\+code().
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_a0d4006daeccd574ddcc9e6c621739c48}\label{classGpgFrontend_1_1GpgKeyManager_a0d4006daeccd574ddcc9e6c621739c48}}
\index{GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}!SetOwnerTrustLevel@{SetOwnerTrustLevel}}
\index{SetOwnerTrustLevel@{SetOwnerTrustLevel}!GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}}
\doxysubsubsection{\texorpdfstring{SetOwnerTrustLevel()}{SetOwnerTrustLevel()}}
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+Gpg\+Key\+Manager\+::\+Set\+Owner\+Trust\+Level (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Key}} \&}]{key, }\item[{int}]{trust\+\_\+level }\end{DoxyParamCaption})}
\begin{DoxyReturn}{Returns}
\end{DoxyReturn}
References Gpg\+Frontend\+::check\+\_\+gpg\+\_\+error\+\_\+2\+\_\+err\+\_\+code(), Gpg\+Frontend\+::\+Gpg\+Key\+::\+Get\+Fingerprint(), and Gpg\+Frontend\+::\+Gpg\+Key\+::\+Get\+Id().
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_a12138780c53add7589f78f056019e5e0}\label{classGpgFrontend_1_1GpgKeyManager_a12138780c53add7589f78f056019e5e0}}
\index{GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}!SignKey@{SignKey}}
\index{SignKey@{SignKey}!GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}}
\doxysubsubsection{\texorpdfstring{SignKey()}{SignKey()}}
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+Gpg\+Key\+Manager\+::\+Sign\+Key (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classGpgFrontend_1_1GpgKey}{Gpg\+Key}} \&}]{target, }\item[{Gpg\+Frontend\+::\+Key\+Args\+List \&}]{keys, }\item[{const std\+::string \&}]{uid, }\item[{const std\+::unique\+\_\+ptr$<$ boost\+::posix\+\_\+time\+::ptime $>$ \&}]{expires }\end{DoxyParamCaption})}
Sign a key pair(actually a certain uid)
\begin{DoxyParams}{Parameters}
{\em target} & target key pair \\
\hline
{\em uid} & target \\
\hline
{\em expires} & expire date and time of the signature \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
if successful
\end{DoxyReturn}
References Gpg\+Frontend\+::check\+\_\+gpg\+\_\+error(), Gpg\+Frontend\+::check\+\_\+gpg\+\_\+error\+\_\+2\+\_\+err\+\_\+code(), Gpg\+Frontend\+::\+Singleton\+Function\+Object$<$ Gpg\+Basic\+Operator $>$\+::\+Get\+Instance(), and Gpg\+Frontend\+::\+Gpg\+Basic\+Operator\+::\+Set\+Signers().
\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classGpgFrontend_1_1GpgKeyManager_a073f96ccfa483a8856197610b8bdee9e}\label{classGpgFrontend_1_1GpgKeyManager_a073f96ccfa483a8856197610b8bdee9e}}
\index{GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}!ctx\_@{ctx\_}}
\index{ctx\_@{ctx\_}!GpgFrontend::GpgKeyManager@{GpgFrontend::GpgKeyManager}}
\doxysubsubsection{\texorpdfstring{ctx\_}{ctx\_}}
{\footnotesize\ttfamily \mbox{\hyperlink{classGpgFrontend_1_1GpgContext}{Gpg\+Context}}\& Gpg\+Frontend\+::\+Gpg\+Key\+Manager\+::ctx\+\_\+\hspace{0.3cm}{\ttfamily [private]}}
{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{=}
\DoxyCodeLine{ \mbox{\hyperlink{classGpgFrontend_1_1SingletonFunctionObject_a70484d7cfe9f9dcbcd5f8bb749250f36}{GpgContext::GetInstance}}(\mbox{\hyperlink{classGpgFrontend_1_1SingletonFunctionObject_aa99440b9177f5d0c18840f08a40d64b7}{SingletonFunctionObject::GetChannel}}())}
\end{DoxyCode}
The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item
src/core/function/gpg/Gpg\+Key\+Manager.\+h\item
src/core/function/gpg/Gpg\+Key\+Manager.\+cpp\end{DoxyCompactItemize}