\hypertarget{structsignal__protocol__session__store}{}\section{signal\+\_\+protocol\+\_\+session\+\_\+store Struct Reference}
\label{structsignal__protocol__session__store}\index{signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}}


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

\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
int($\ast$ \hyperlink{structsignal__protocol__session__store_acec51c0ab2f8cd3375e2eafbbf769663}{load\+\_\+session\+\_\+func} )(\hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$record, \hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$user\+\_\+record, const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__session__store_a05210041954cd79829a6665e3120763d}{get\+\_\+sub\+\_\+device\+\_\+sessions\+\_\+func} )(\hyperlink{signal__protocol__types_8h_ad9b54e10dfdafa3f52ef80a00acd5d1d}{signal\+\_\+int\+\_\+list} $\ast$$\ast$sessions, const char $\ast$name, size\+\_\+t name\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__session__store_aed4e0fc474af63d69c2efa14bf78b065}{store\+\_\+session\+\_\+func} )(const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, \hyperlink{uthash_8h_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$record, size\+\_\+t record\+\_\+len, \hyperlink{uthash_8h_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$user\+\_\+record, size\+\_\+t user\+\_\+record\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__session__store_adf1a0b19ae14f2df9d1cf5dc339acece}{contains\+\_\+session\+\_\+func} )(const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__session__store_ae05e3970a3a2d60e263414d79d0fffa2}{delete\+\_\+session\+\_\+func} )(const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
int($\ast$ \hyperlink{structsignal__protocol__session__store_ab2c112200ce91de8370359ca46ea000b}{delete\+\_\+all\+\_\+sessions\+\_\+func} )(const char $\ast$name, size\+\_\+t name\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
void($\ast$ \hyperlink{structsignal__protocol__session__store_aff3fc05d69acc3eb8074e6d587bbffe2}{destroy\+\_\+func} )(void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})
\item 
void $\ast$ \hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data}
\end{DoxyCompactItemize}


\subsection{Detailed Description}


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



\subsection{Field Documentation}
\mbox{\Hypertarget{structsignal__protocol__session__store_adf1a0b19ae14f2df9d1cf5dc339acece}\label{structsignal__protocol__session__store_adf1a0b19ae14f2df9d1cf5dc339acece}} 
\index{signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}!contains\+\_\+session\+\_\+func@{contains\+\_\+session\+\_\+func}}
\index{contains\+\_\+session\+\_\+func@{contains\+\_\+session\+\_\+func}!signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}}
\subsubsection{\texorpdfstring{contains\+\_\+session\+\_\+func}{contains\_session\_func}}
{\footnotesize\ttfamily int($\ast$ contains\+\_\+session\+\_\+func) (const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Determine whether there is a committed session record for a recipient ID + device ID tuple.


\begin{DoxyParams}{Parameters}
{\em address} & the address of the remote client \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if a session record exists, 0 otherwise. 
\end{DoxyReturn}


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

\mbox{\Hypertarget{structsignal__protocol__session__store_ab2c112200ce91de8370359ca46ea000b}\label{structsignal__protocol__session__store_ab2c112200ce91de8370359ca46ea000b}} 
\index{signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}!delete\+\_\+all\+\_\+sessions\+\_\+func@{delete\+\_\+all\+\_\+sessions\+\_\+func}}
\index{delete\+\_\+all\+\_\+sessions\+\_\+func@{delete\+\_\+all\+\_\+sessions\+\_\+func}!signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}}
\subsubsection{\texorpdfstring{delete\+\_\+all\+\_\+sessions\+\_\+func}{delete\_all\_sessions\_func}}
{\footnotesize\ttfamily int($\ast$ delete\+\_\+all\+\_\+sessions\+\_\+func) (const char $\ast$name, size\+\_\+t name\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Remove the session records corresponding to all devices of a recipient ID.


\begin{DoxyParams}{Parameters}
{\em name} & the name of the remote client \\
\hline
{\em name\+\_\+len} & the length of the name \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number of deleted sessions on success, negative on failure 
\end{DoxyReturn}


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

\mbox{\Hypertarget{structsignal__protocol__session__store_ae05e3970a3a2d60e263414d79d0fffa2}\label{structsignal__protocol__session__store_ae05e3970a3a2d60e263414d79d0fffa2}} 
\index{signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}!delete\+\_\+session\+\_\+func@{delete\+\_\+session\+\_\+func}}
\index{delete\+\_\+session\+\_\+func@{delete\+\_\+session\+\_\+func}!signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}}
\subsubsection{\texorpdfstring{delete\+\_\+session\+\_\+func}{delete\_session\_func}}
{\footnotesize\ttfamily int($\ast$ delete\+\_\+session\+\_\+func) (const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Remove a session record for a recipient ID + device ID tuple.


\begin{DoxyParams}{Parameters}
{\em address} & the address of the remote client \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if a session was deleted, 0 if a session was not deleted, negative on error 
\end{DoxyReturn}


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

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

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

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

\mbox{\Hypertarget{structsignal__protocol__session__store_a05210041954cd79829a6665e3120763d}\label{structsignal__protocol__session__store_a05210041954cd79829a6665e3120763d}} 
\index{signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}!get\+\_\+sub\+\_\+device\+\_\+sessions\+\_\+func@{get\+\_\+sub\+\_\+device\+\_\+sessions\+\_\+func}}
\index{get\+\_\+sub\+\_\+device\+\_\+sessions\+\_\+func@{get\+\_\+sub\+\_\+device\+\_\+sessions\+\_\+func}!signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}}
\subsubsection{\texorpdfstring{get\+\_\+sub\+\_\+device\+\_\+sessions\+\_\+func}{get\_sub\_device\_sessions\_func}}
{\footnotesize\ttfamily int($\ast$ get\+\_\+sub\+\_\+device\+\_\+sessions\+\_\+func) (\hyperlink{signal__protocol__types_8h_ad9b54e10dfdafa3f52ef80a00acd5d1d}{signal\+\_\+int\+\_\+list} $\ast$$\ast$sessions, const char $\ast$name, size\+\_\+t name\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Returns all known devices with active sessions for a recipient


\begin{DoxyParams}{Parameters}
{\em pointer} & to an array that will be allocated and populated with the result \\
\hline
{\em name} & the name of the remote client \\
\hline
{\em name\+\_\+len} & the length of the name \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
size of the sessions array, or negative on failure 
\end{DoxyReturn}


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

\mbox{\Hypertarget{structsignal__protocol__session__store_acec51c0ab2f8cd3375e2eafbbf769663}\label{structsignal__protocol__session__store_acec51c0ab2f8cd3375e2eafbbf769663}} 
\index{signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}!load\+\_\+session\+\_\+func@{load\+\_\+session\+\_\+func}}
\index{load\+\_\+session\+\_\+func@{load\+\_\+session\+\_\+func}!signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}}
\subsubsection{\texorpdfstring{load\+\_\+session\+\_\+func}{load\_session\_func}}
{\footnotesize\ttfamily int($\ast$ load\+\_\+session\+\_\+func) (\hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$record, \hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$user\+\_\+record, const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Returns a copy of the serialized session record corresponding to the provided recipient ID + device ID tuple.


\begin{DoxyParams}{Parameters}
{\em record} & pointer to a freshly allocated buffer containing the serialized session record. Unset if no record was found. The Signal Protocol library is responsible for freeing this buffer. \\
\hline
{\em user\+\_\+record} & pointer to a freshly allocated buffer containing application specific data stored alongside the serialized session record. If no such data exists, then this pointer may be left unset. The Signal Protocol library is responsible for freeing this buffer. \\
\hline
{\em address} & the address of the remote client \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if the session was loaded, 0 if the session was not found, negative on failure 
\end{DoxyReturn}


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

\mbox{\Hypertarget{structsignal__protocol__session__store_aed4e0fc474af63d69c2efa14bf78b065}\label{structsignal__protocol__session__store_aed4e0fc474af63d69c2efa14bf78b065}} 
\index{signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}!store\+\_\+session\+\_\+func@{store\+\_\+session\+\_\+func}}
\index{store\+\_\+session\+\_\+func@{store\+\_\+session\+\_\+func}!signal\+\_\+protocol\+\_\+session\+\_\+store@{signal\+\_\+protocol\+\_\+session\+\_\+store}}
\subsubsection{\texorpdfstring{store\+\_\+session\+\_\+func}{store\_session\_func}}
{\footnotesize\ttfamily int($\ast$ store\+\_\+session\+\_\+func) (const \hyperlink{structsignal__protocol__address}{signal\+\_\+protocol\+\_\+address} $\ast$address, \hyperlink{uthash_8h_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$record, size\+\_\+t record\+\_\+len, \hyperlink{uthash_8h_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$user\+\_\+record, size\+\_\+t user\+\_\+record\+\_\+len, void $\ast$\hyperlink{structsignal__protocol__session__store_a0f53d287ac7c064d1a49d4bd93ca1cb9}{user\+\_\+data})}

Commit to storage the session record for a given recipient ID + device ID tuple.


\begin{DoxyParams}{Parameters}
{\em address} & the address of the remote client \\
\hline
{\em record} & pointer to a buffer containing the serialized session record for the remote client \\
\hline
{\em record\+\_\+len} & length of the serialized session record \\
\hline
{\em user\+\_\+record} & pointer to a buffer containing application specific data to be stored alongside the serialized session record for the remote client. If no such data exists, then this pointer will be null. \\
\hline
{\em user\+\_\+record\+\_\+len} & length of the application specific data \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, negative on failure 
\end{DoxyReturn}


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

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

User data pointer 

Definition at line 489 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}
