\hypertarget{group__OVALVAR}{ \section{OVAL External Variable Binding} \label{group__OVALVAR}\index{OVAL External Variable Binding@{OVAL External Variable Binding}} } Public interface to OVAL External Variable Binding. \subsection*{Data Structures} \begin{DoxyCompactItemize} \item struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} \begin{DoxyCompactList}\small\item\em The OVAL variable model facilitates access to external variable value bindings used to to constrain the evaluation of OVAL objects. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Files} \begin{DoxyCompactItemize} \item file \hyperlink{oval__variables_8h}{oval\_\-variables.h} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item int \hyperlink{group__OVALVAR_ga275b0d836afc5e6b590744b74c918678}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-import} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$, struct \hyperlink{structoscap__import__source}{oscap\_\-import\_\-source} $\ast$, void $\ast$) \begin{DoxyCompactList}\small\item\em Load the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} from an XML stream. \item\end{DoxyCompactList}\item \hypertarget{group__OVALVAR_gabaafcd4d6b01dd453467648be6af9ef1}{ struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$ \hyperlink{group__OVALVAR_gabaafcd4d6b01dd453467648be6af9ef1}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-new} (void)} \label{group__OVALVAR_gabaafcd4d6b01dd453467648be6af9ef1} \begin{DoxyCompactList}\small\item\em Create a new OVAL variable model. \item\end{DoxyCompactList}\item \hypertarget{group__OVALVAR_gae1c4184092de65edfe1424ad1759dd23}{ struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$ \hyperlink{group__OVALVAR_gae1c4184092de65edfe1424ad1759dd23}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-clone} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$)} \label{group__OVALVAR_gae1c4184092de65edfe1424ad1759dd23} \begin{DoxyCompactList}\small\item\em Clone an OVAL variable model. \item\end{DoxyCompactList}\item void \hyperlink{group__OVALVAR_ga365f33d97173121f2ad7ccfccf336843}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-free} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$) \begin{DoxyCompactList}\small\item\em Free memory allocated to a specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item\end{DoxyCompactList}\item int \hyperlink{group__OVALVAR_gafc39c319dc4ed43ab55b362bcdc19ce8}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-export} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$, struct \hyperlink{structoscap__export__target}{oscap\_\-export\_\-target} $\ast$) \begin{DoxyCompactList}\small\item\em Export the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} to an XML stream. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Setters} \label{_amgrp6e47466b75bb957a603aa54c079ac8bf} \begin{DoxyCompactItemize} \item void \hyperlink{group__OVALVAR_ga85e31b556710186bd3ee73af8005fc2b}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-lock} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$variable\_\-model) \begin{DoxyCompactList}\small\item\em Lock the variable\_\-model instance. \item\end{DoxyCompactList}\item void \hyperlink{group__OVALVAR_ga462a5716ee28a72b8f053b188507551b}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-add} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$model, char $\ast$varid, const char $\ast$comment, \hyperlink{group__OVALDEF_gaf069fe2fb2a9ae3abe47cab55b89827e}{oval\_\-datatype\_\-t} datatype, char $\ast$value) \begin{DoxyCompactList}\small\item\em Get the values bound to a specified external variable. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Getters} \label{_amgrpc9fd0bcb5385a65354c37f1bb504399d} \begin{DoxyCompactItemize} \item struct \hyperlink{structoval__string__iterator}{oval\_\-string\_\-iterator} $\ast$ \hyperlink{group__OVALVAR_ga1dbc23e41fad2352ee9ac24578258bdf}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-get\_\-variable\_\-ids} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$) \begin{DoxyCompactList}\small\item\em Get all external variables managed by a specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item\end{DoxyCompactList}\item \hyperlink{group__OVALDEF_gaf069fe2fb2a9ae3abe47cab55b89827e}{oval\_\-datatype\_\-t} \hyperlink{group__OVALVAR_gaf4a30ae55879ddf17627934f4fde1c9b}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-get\_\-datatype} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$, char $\ast$) \begin{DoxyCompactList}\small\item\em Get a specified external variable datatype. \item\end{DoxyCompactList}\item const char $\ast$ \hyperlink{group__OVALVAR_ga4b189de3fb06eb07c756d44e56ecd096}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-get\_\-comment} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$, char $\ast$) \begin{DoxyCompactList}\small\item\em Get a specified external variable comment. \item\end{DoxyCompactList}\item struct \hyperlink{structoval__string__iterator}{oval\_\-string\_\-iterator} $\ast$ \hyperlink{group__OVALVAR_ga2e52fe832f3cf5c63d4d6890472e85c8}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-get\_\-values} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$, char $\ast$) \begin{DoxyCompactList}\small\item\em Get the values bound to a specified external variable. \item\end{DoxyCompactList}\item bool \hyperlink{group__OVALVAR_ga021f29cdfde3e07d67953eef473f5565}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-is\_\-locked} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$variable\_\-model) \begin{DoxyCompactList}\small\item\em Return {\bfseries true} if the variable\_\-model instance is locked. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Evaluators} \label{_amgrp1fdbbbb8aba6580be2c9cb4b12e86ca2} \begin{DoxyCompactItemize} \item \hypertarget{group__OVALVAR_gaf6bb2f236105616566abc218b91901c3}{ bool \hyperlink{group__OVALVAR_gaf6bb2f236105616566abc218b91901c3}{oval\_\-variable\_\-model::oval\_\-variable\_\-model\_\-is\_\-valid} (struct \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} $\ast$variable\_\-model)} \label{group__OVALVAR_gaf6bb2f236105616566abc218b91901c3} \begin{DoxyCompactList}\small\item\em Return {\bfseries true} if the variable\_\-model instance is valid. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Detailed Description} Public interface to OVAL External Variable Binding. \subsection{Function Documentation} \hypertarget{group__OVALVAR_ga462a5716ee28a72b8f053b188507551b}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-add@{oval\_\-variable\_\-model\_\-add}} \index{oval\_\-variable\_\-model\_\-add@{oval\_\-variable\_\-model\_\-add}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-add}]{\setlength{\rightskip}{0pt plus 5cm}void oval\_\-variable\_\-model\_\-add (struct {\bf oval\_\-variable\_\-model} $\ast$ {\em model}, \/ char $\ast$ {\em varid}, \/ const char $\ast$ {\em comment}, \/ {\bf oval\_\-datatype\_\-t} {\em datatype}, \/ char $\ast$ {\em value})\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_ga462a5716ee28a72b8f053b188507551b} Get the values bound to a specified external variable. If the varid does not resolve to a managed external variable, this method returns NULL. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item[{\em varid}]the identifier of the required \hyperlink{structoval__variable}{oval\_\-variable}. \end{DoxyParams} \hypertarget{group__OVALVAR_gafc39c319dc4ed43ab55b362bcdc19ce8}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-export@{oval\_\-variable\_\-model\_\-export}} \index{oval\_\-variable\_\-model\_\-export@{oval\_\-variable\_\-model\_\-export}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-export}]{\setlength{\rightskip}{0pt plus 5cm}int oval\_\-variable\_\-model\_\-export (struct {\bf oval\_\-variable\_\-model} $\ast$, \/ struct {\bf oscap\_\-export\_\-target} $\ast$)\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_gafc39c319dc4ed43ab55b362bcdc19ce8} Export the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} to an XML stream. The exported document element is a valid instance of $<$\href{http://oval.mitre.org/XMLSchema/oval-variables-5:oval_variables}{\tt http://oval.mitre.org/XMLSchema/oval-\/variables-\/5:oval\_\-variables}$>$. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item[{\em export\_\-target}]the \hyperlink{structoscap__export__target}{oscap\_\-export\_\-target} that resolves the output XML stream. \end{DoxyParams} \hypertarget{group__OVALVAR_ga365f33d97173121f2ad7ccfccf336843}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-free@{oval\_\-variable\_\-model\_\-free}} \index{oval\_\-variable\_\-model\_\-free@{oval\_\-variable\_\-model\_\-free}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-free}]{\setlength{\rightskip}{0pt plus 5cm}void oval\_\-variable\_\-model\_\-free (struct {\bf oval\_\-variable\_\-model} $\ast$)\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_ga365f33d97173121f2ad7ccfccf336843} Free memory allocated to a specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} \end{DoxyParams} \hypertarget{group__OVALVAR_ga4b189de3fb06eb07c756d44e56ecd096}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-get\_\-comment@{oval\_\-variable\_\-model\_\-get\_\-comment}} \index{oval\_\-variable\_\-model\_\-get\_\-comment@{oval\_\-variable\_\-model\_\-get\_\-comment}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-get\_\-comment}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ oval\_\-variable\_\-model\_\-get\_\-comment (struct {\bf oval\_\-variable\_\-model} $\ast$, \/ char $\ast$)\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_ga4b189de3fb06eb07c756d44e56ecd096} Get a specified external variable comment. If the varid does not resolve to a managed external variable, this method returns NULL. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item[{\em varid}]the identifier of the required \hyperlink{structoval__variable}{oval\_\-variable}. \end{DoxyParams} \hypertarget{group__OVALVAR_gaf4a30ae55879ddf17627934f4fde1c9b}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-get\_\-datatype@{oval\_\-variable\_\-model\_\-get\_\-datatype}} \index{oval\_\-variable\_\-model\_\-get\_\-datatype@{oval\_\-variable\_\-model\_\-get\_\-datatype}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-get\_\-datatype}]{\setlength{\rightskip}{0pt plus 5cm}{\bf oval\_\-datatype\_\-t} oval\_\-variable\_\-model\_\-get\_\-datatype (struct {\bf oval\_\-variable\_\-model} $\ast$, \/ char $\ast$)\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_gaf4a30ae55879ddf17627934f4fde1c9b} Get a specified external variable datatype. If the varid does not resolve to a managed external variable, this method returns 0. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item[{\em varid}]the identifier of the required \hyperlink{structoval__variable}{oval\_\-variable}. \end{DoxyParams} \hypertarget{group__OVALVAR_ga2e52fe832f3cf5c63d4d6890472e85c8}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-get\_\-values@{oval\_\-variable\_\-model\_\-get\_\-values}} \index{oval\_\-variable\_\-model\_\-get\_\-values@{oval\_\-variable\_\-model\_\-get\_\-values}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-get\_\-values}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf oval\_\-string\_\-iterator} $\ast$ oval\_\-variable\_\-model\_\-get\_\-values (struct {\bf oval\_\-variable\_\-model} $\ast$, \/ char $\ast$)\hspace{0.3cm}{\ttfamily \mbox{[}read, inherited\mbox{]}}}} \label{group__OVALVAR_ga2e52fe832f3cf5c63d4d6890472e85c8} Get the values bound to a specified external variable. If the varid does not resolve to a managed external variable, this method returns NULL. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item[{\em varid}]the identifier of the required \hyperlink{structoval__variable}{oval\_\-variable}. \end{DoxyParams} \hypertarget{group__OVALVAR_ga1dbc23e41fad2352ee9ac24578258bdf}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-get\_\-variable\_\-ids@{oval\_\-variable\_\-model\_\-get\_\-variable\_\-ids}} \index{oval\_\-variable\_\-model\_\-get\_\-variable\_\-ids@{oval\_\-variable\_\-model\_\-get\_\-variable\_\-ids}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-get\_\-variable\_\-ids}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf oval\_\-string\_\-iterator} $\ast$ oval\_\-variable\_\-model\_\-get\_\-variable\_\-ids (struct {\bf oval\_\-variable\_\-model} $\ast$)\hspace{0.3cm}{\ttfamily \mbox{[}read, inherited\mbox{]}}}} \label{group__OVALVAR_ga1dbc23e41fad2352ee9ac24578258bdf} Get all external variables managed by a specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \end{DoxyParams} \hypertarget{group__OVALVAR_ga275b0d836afc5e6b590744b74c918678}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-import@{oval\_\-variable\_\-model\_\-import}} \index{oval\_\-variable\_\-model\_\-import@{oval\_\-variable\_\-model\_\-import}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-import}]{\setlength{\rightskip}{0pt plus 5cm}int oval\_\-variable\_\-model\_\-import (struct {\bf oval\_\-variable\_\-model} $\ast$, \/ struct {\bf oscap\_\-import\_\-source} $\ast$, \/ void $\ast$)\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_ga275b0d836afc5e6b590744b74c918678} Load the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model} from an XML stream. The stream document element must be a valid instance of $<$\href{http://oval.mitre.org/XMLSchema/oval-variables-5:oval_variables}{\tt http://oval.mitre.org/XMLSchema/oval-\/variables-\/5:oval\_\-variables}$>$. If the \hyperlink{structoval__variable}{oval\_\-variable} model is not empty, the loaded content will be appended to the existing content. \begin{DoxyParams}{Parameters} \item[{\em variable\_\-model}]the specified \hyperlink{structoval__variable__model}{oval\_\-variable\_\-model}. \item[{\em import\_\-source}]the \hyperlink{structoscap__import__source}{oscap\_\-import\_\-source} that resolves the XML stream. \item[{\em user\_\-param}]a user parameter that is passed the the error handler implementation. \end{DoxyParams} \hypertarget{group__OVALVAR_ga021f29cdfde3e07d67953eef473f5565}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-is\_\-locked@{oval\_\-variable\_\-model\_\-is\_\-locked}} \index{oval\_\-variable\_\-model\_\-is\_\-locked@{oval\_\-variable\_\-model\_\-is\_\-locked}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-is\_\-locked}]{\setlength{\rightskip}{0pt plus 5cm}bool oval\_\-variable\_\-model\_\-is\_\-locked (struct {\bf oval\_\-variable\_\-model} $\ast$ {\em variable\_\-model})\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_ga021f29cdfde3e07d67953eef473f5565} Return {\bfseries true} if the variable\_\-model instance is locked. The state of a locked instance cannot be changed. \hypertarget{group__OVALVAR_ga85e31b556710186bd3ee73af8005fc2b}{ \index{OVALVAR@{OVALVAR}!oval\_\-variable\_\-model\_\-lock@{oval\_\-variable\_\-model\_\-lock}} \index{oval\_\-variable\_\-model\_\-lock@{oval\_\-variable\_\-model\_\-lock}!OVALVAR@{OVALVAR}} \subsubsection[{oval\_\-variable\_\-model\_\-lock}]{\setlength{\rightskip}{0pt plus 5cm}void oval\_\-variable\_\-model\_\-lock (struct {\bf oval\_\-variable\_\-model} $\ast$ {\em variable\_\-model})\hspace{0.3cm}{\ttfamily \mbox{[}inherited\mbox{]}}}} \label{group__OVALVAR_ga85e31b556710186bd3ee73af8005fc2b} Lock the variable\_\-model instance. The state of a locked instance cannot be changed. This operation has no effect if the model is already locked.