\hypertarget{structsignal__protocol__pre__key__store}{}\section{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store Struct Reference}
\label{structsignal__protocol__pre__key__store}\index{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}}


{\ttfamily \#include $<$signal\+\_\+protocol.\+h$>$}

\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
int($\ast$ \hyperlink{structsignal__protocol__pre__key__store_aefba10fb5a3d033eaf53a37d8e8ff0da}{load\+\_\+pre\+\_\+key} )(\hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$record, \hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__pre__key__store_a8e436931aecc2bca5a71805c9ada39ed}{store\+\_\+pre\+\_\+key} )(\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, \hyperlink{uthash_8h_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$record, size\+\_\+t record\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__pre__key__store_a18be061bb7acc950e2932ab03e084c8e}{contains\+\_\+pre\+\_\+key} )(\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__pre__key__store_a2f65a84f37a391cd6e32dbde78b511b6}{remove\+\_\+pre\+\_\+key} )(\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
void($\ast$ \hyperlink{structsignal__protocol__pre__key__store_aff3fc05d69acc3eb8074e6d587bbffe2}{destroy\+\_\+func} )(void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
void $\ast$ \hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data}
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 492 of file signal\+\_\+protocol.\+h.



\subsection{Field Documentation}
\mbox{\Hypertarget{structsignal__protocol__pre__key__store_a18be061bb7acc950e2932ab03e084c8e}\label{structsignal__protocol__pre__key__store_a18be061bb7acc950e2932ab03e084c8e}} 
\index{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}!contains\+\_\+pre\+\_\+key@{contains\+\_\+pre\+\_\+key}}
\index{contains\+\_\+pre\+\_\+key@{contains\+\_\+pre\+\_\+key}!signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}}
\subsubsection{\texorpdfstring{contains\+\_\+pre\+\_\+key}{contains\_pre\_key}}
{\footnotesize\ttfamily int($\ast$ contains\+\_\+pre\+\_\+key) (\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Determine whether there is a committed Pre\+Key record matching the provided ID.


\begin{DoxyParams}{Parameters}
{\em pre\+\_\+key\+\_\+id} & A Pre\+Key record ID. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if the store has a record for the Pre\+Key ID, 0 otherwise 
\end{DoxyReturn}


Definition at line 522 of file signal\+\_\+protocol.\+h.

\mbox{\Hypertarget{structsignal__protocol__pre__key__store_aff3fc05d69acc3eb8074e6d587bbffe2}\label{structsignal__protocol__pre__key__store_aff3fc05d69acc3eb8074e6d587bbffe2}} 
\index{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}!destroy\+\_\+func@{destroy\+\_\+func}}
\index{destroy\+\_\+func@{destroy\+\_\+func}!signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}}
\subsubsection{\texorpdfstring{destroy\+\_\+func}{destroy\_func}}
{\footnotesize\ttfamily void($\ast$ destroy\+\_\+func) (void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Function called to perform cleanup when the data store context is being destroyed. 

Definition at line 536 of file signal\+\_\+protocol.\+h.

\mbox{\Hypertarget{structsignal__protocol__pre__key__store_aefba10fb5a3d033eaf53a37d8e8ff0da}\label{structsignal__protocol__pre__key__store_aefba10fb5a3d033eaf53a37d8e8ff0da}} 
\index{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}!load\+\_\+pre\+\_\+key@{load\+\_\+pre\+\_\+key}}
\index{load\+\_\+pre\+\_\+key@{load\+\_\+pre\+\_\+key}!signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}}
\subsubsection{\texorpdfstring{load\+\_\+pre\+\_\+key}{load\_pre\_key}}
{\footnotesize\ttfamily int($\ast$ load\+\_\+pre\+\_\+key) (\hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$record, \hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Load a local serialized Pre\+Key record.


\begin{DoxyParams}{Parameters}
{\em record} & pointer to a newly allocated buffer containing the record, if found. Unset if no record was found. The Signal Protocol library is responsible for freeing this buffer. \\
\hline
{\em pre\+\_\+key\+\_\+id} & the ID of the local serialized Pre\+Key record \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em S\+G\+\_\+\+S\+U\+C\+C\+E\+SS} & if the key was found \\
\hline
{\em S\+G\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+E\+Y\+\_\+\+ID} & if the key could not be found \\
\hline
\end{DoxyRetVals}


Definition at line 503 of file signal\+\_\+protocol.\+h.

\mbox{\Hypertarget{structsignal__protocol__pre__key__store_a2f65a84f37a391cd6e32dbde78b511b6}\label{structsignal__protocol__pre__key__store_a2f65a84f37a391cd6e32dbde78b511b6}} 
\index{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}!remove\+\_\+pre\+\_\+key@{remove\+\_\+pre\+\_\+key}}
\index{remove\+\_\+pre\+\_\+key@{remove\+\_\+pre\+\_\+key}!signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}}
\subsubsection{\texorpdfstring{remove\+\_\+pre\+\_\+key}{remove\_pre\_key}}
{\footnotesize\ttfamily int($\ast$ remove\+\_\+pre\+\_\+key) (\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Delete a Pre\+Key record from local storage.


\begin{DoxyParams}{Parameters}
{\em pre\+\_\+key\+\_\+id} & The ID of the Pre\+Key record to remove. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, negative on failure 
\end{DoxyReturn}


Definition at line 530 of file signal\+\_\+protocol.\+h.

\mbox{\Hypertarget{structsignal__protocol__pre__key__store_a8e436931aecc2bca5a71805c9ada39ed}\label{structsignal__protocol__pre__key__store_a8e436931aecc2bca5a71805c9ada39ed}} 
\index{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}!store\+\_\+pre\+\_\+key@{store\+\_\+pre\+\_\+key}}
\index{store\+\_\+pre\+\_\+key@{store\+\_\+pre\+\_\+key}!signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}}
\subsubsection{\texorpdfstring{store\+\_\+pre\+\_\+key}{store\_pre\_key}}
{\footnotesize\ttfamily int($\ast$ store\+\_\+pre\+\_\+key) (\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} pre\+\_\+key\+\_\+id, \hyperlink{uthash_8h_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$record, size\+\_\+t record\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Store a local serialized Pre\+Key record.


\begin{DoxyParams}{Parameters}
{\em pre\+\_\+key\+\_\+id} & the ID of the Pre\+Key record to store. \\
\hline
{\em record} & pointer to a buffer containing the serialized record \\
\hline
{\em record\+\_\+len} & length of the serialized record \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, negative on failure 
\end{DoxyReturn}


Definition at line 513 of file signal\+\_\+protocol.\+h.

\mbox{\Hypertarget{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}\label{structsignal__protocol__pre__key__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}} 
\index{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}!user\+\_\+data@{user\+\_\+data}}
\index{user\+\_\+data@{user\+\_\+data}!signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store@{signal\+\_\+protocol\+\_\+pre\+\_\+key\+\_\+store}}
\subsubsection{\texorpdfstring{user\+\_\+data}{user\_data}}
{\footnotesize\ttfamily void$\ast$ user\+\_\+data}

User data pointer 

Definition at line 539 of file signal\+\_\+protocol.\+h.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/\hyperlink{signal__protocol_8h}{signal\+\_\+protocol.\+h}\end{DoxyCompactItemize}
