> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/ui__mode_8h.md).

# ui\_mode.h

[Functions](#func-members)

`#include <string>`

Include dependency graph for ui\_mode.h:

![](/files/DDV5gmoz5MD5xUpPccqR)

This graph shows which files directly or indirectly include this file:

![](/files/CV9OdxAiAmyNFSMrWYnA)

[Go to the source code of this file.](/s-adk-5.1-programmers-guide/ui__mode_8h_source.md)

|           |                                                                                                       |
| --------- | ----------------------------------------------------------------------------------------------------- |
| Functions |                                                                                                       |
| void      | [init\_ui\_mode](#a66a4622071497e674b301c3c01f0041d) ()                                               |
| bool      | [select\_com\_profile](#a55d15b6967e1c13ce450da41e5624e0a) (int comInterfaces, char \*\*ComFileName)  |
| void      | [reset\_com\_profile](#a4b5e64e6037e936f64283fb6f75747ae) ()                                          |
| void      | [protocol\_status\_ui\_update](#a6a46d1447df15675918b58136a68b3b1) (const struct ProtStatus \*status) |
| bool      | [multi\_connection\_support\_enabled](#a72dc449a4d0934020d297eb7a1b5a1a6) ()                          |
| bool      | [comcfg\_file\_valid](#ad17510e582c63802351a6b0acb27dfca) (const std::string \&comcfg\_file)          |
| void      | [show\_idle\_connect\_status](#a6dcc06a913ac018ca40d1a0eae7b557b) ()                                  |

### FunctionDocumentation <a href="#function-documentation" id="function-documentation"></a>

### comcfg\_file\_valid() <a href="#ad17510e582c63802351a6b0acb27dfca" id="ad17510e582c63802351a6b0acb27dfca"></a>

bool comcfg\_file\_valid

check content of SDI communication settings file COM\_IF.CFG, if it is well formatted and contains at least a COM profile. If not, the file is considered as currupt and needs recovery.

#### Returns

true, if file *com\_if\_file* has valid format of expected COM\_IF.CFG, else false.

### init\_ui\_mode() <a href="#a66a4622071497e674b301c3c01f0041d" id="a66a4622071497e674b301c3c01f0041d"></a>

void init\_ui\_mode

This module contains implementation, which is additionally required to support standard UI mode. Most of these implementations are UI related (e.g. to provide COM menus, idlescreen etc.) SDI variants using this module are compiled without define HEADLESS to add UI standard mode, in addition to headless mode. Finally, program parameter --headless will switch the SDI mode at startup. Recently supported platforms with UI support are: VOS/VOS2/VOS3 Note: This module also contains functions invoked for headless mode on these platforms, too. This is to cover the same behavior as in UI mode. (e.g. selection of a COM profile by COM\_IF.CFG (COM settings file). function called once at startup to initialize UI mode of SDI

### multi\_connection\_support\_enabled() <a href="#a72dc449a4d0934020d297eb7a1b5a1a6" id="a72dc449a4d0934020d297eb7a1b5a1a6"></a>

bool multi\_connection\_support\_enabled

For VOS/VOS2/VOS3 devices this function returns true, if SDI protocol with multi-connection support (using ADKIPC) was enabled by COM settings file. For other platforms this function just returns false.

#### Returns

true, if the IPC variant of the SDI protocol library shall be used on VOS/VOS2/VOS3, else false (e.g. disabled by configuration or wrong platform).

### protocol\_status\_ui\_update() <a href="#a6a46d1447df15675918b58136a68b3b1" id="a6a46d1447df15675918b58136a68b3b1"></a>

void protocol\_status\_ui\_update

### reset\_com\_profile() <a href="#a4b5e64e6037e936f64283fb6f75747ae" id="a4b5e64e6037e936f64283fb6f75747ae"></a>

void reset\_com\_profile

Function to reset selected COM profile and clear current COM configuration. This will force reading of COM configuration and selection of COM profile with next call of [select\_com\_profile()](#a55d15b6967e1c13ce450da41e5624e0a).

### select\_com\_profile() <a href="#a55d15b6967e1c13ce450da41e5624e0a" id="a55d15b6967e1c13ce450da41e5624e0a"></a>

bool select\_com\_profile

Function invoked by SDI protocol to select and specify the used COM profile. The function passes the available COM interfaces in parameter *comInterfaces* as bitmask with values of ADKCOM enum com\_FeatureMask1, so that SDI COM settings menu is displayed with corresponding entries with configuration options. With first invocation at startup with default settings, SDI shows up a COM setting wizard (in standard UI mode) from which the user is able to select the COM profile to use. Once the profile and settings are applied the function knows the stored settings for further SDI startups. On success, the function returns full path of the COM profile assigned to pointer of parameter *ComFileName*. The supplied buffer of this parameter is static, thus, the caller (SDI protocol) doen't need to care about to release resources of it.

**Parameters**

\[in] **comInterfaces** available COM interfaces, bitmask of ADKCOM enum com\_FeatureMask1 \[out] **ComFileName** full path to COM profile to use

#### Returns

true on success, else false on error

### show\_idle\_connect\_status() <a href="#a6dcc06a913ac018ca40d1a0eae7b557b" id="a6dcc06a913ac018ca40d1a0eae7b557b"></a>

void show\_idle\_connect\_status

function to read the connect status from the SDI protocol and to display with the idlescreen. This is usually triggered by the running SDI protocol via callback, but in special situations this is required to be triggered by SDI (e.g. in EPP mode during SDI startup).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/ui__mode_8h.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
