> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/sdks-and-tools/universal-sdk-documentation/linux/iconfigurationcallback-delegates.md).

# IConfigurationCallback Delegates

This interface invokes a callback function to receive data and/or a detailed response. To register for the event(s), call the subscribeAll() function with the name of a class that implements the IConfigurationCallback Delegates interface.

## OnCalculateMAC <a href="#id-12.1_oncalculatemac" id="id-12.1_oncalculatemac"></a>

This event is called when certain asynchronous IDeviceConfiguration operations need to have a MAC included with the request.

{% code overflow="wrap" %}

```
IResult OnCalculateMAC( 
        unsigned char MACType,
        vector<unsigned char> data);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="147.181884765625" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">MACType</td><td valign="top">Type of Mac algorithm. For DynaFlex, use 0.</td></tr><tr><td valign="top">data</td><td valign="top">Contains the data of the payload to MAC.</td></tr></tbody></table>

Return Value: An IResult that contains the calculated MAC.

## OnProgress <a href="#id-12.2_onprogress" id="id-12.2_onprogress"></a>

This event is called to update the host on the progress of an asynchronous IDeviceConfiguration operation. Enacted during but not limited to file sending and firmware updates.

{% code overflow="wrap" %}

```
void OnProgress(int progress);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="126.272705078125" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top"><p> </p><p>progress</p></td><td valign="top"><p>The progress of the configuration operation. Range:</p><p>0 - 100</p></td></tr></tbody></table>

Return Value: None

## OnResult <a href="#id-12.3_onresult" id="id-12.3_onresult"></a>

This event is called to update the host when an asynchronous IDeviceConfiguration operation is completed.

{% code overflow="wrap" %}

```
void OnResult(
        int status,
        vector<unsigned char> data);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="118.09088134765625" valign="top"></th><th valign="top"></th><th width="44.818115234375"></th><th></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td colspan="3" valign="top">Description</td></tr><tr><td rowspan="25" valign="top"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p>status</p></td><td colspan="3" valign="top">Int representing an enumerated NFCEvent This enum refers to NFC events.</td></tr><tr><td colspan="2" valign="top">Enum</td><td>Descri</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_None</td><td>No events yet to occur.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_TagRemoved</td><td>Tag removed.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_NFCMifareUltralight</td><td>Mifare Ultralight.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_MifareClassic</td><td>Mifare Classic.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_CommandFailed</td><td>NFC command failed.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_Failed</td><td>Failed.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_IOFailed</td><td>IO failed.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_MifareClassic1K</td><td>Mifare Classic 1K.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_MifareClassic4K</td><td>Mifare Classic 4K.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_MifareDESFire</td><td>Mifare DESFire.</td></tr><tr><td colspan="2" valign="top">MTUSDKNFCE_AuthenticationFaile d</td><td>Authentication failed.</td></tr><tr><td colspan="3" valign="top"><p><strong>PaymentMethods</strong></p><p>This enum refers to which card type the device will perform a transaction.</p></td></tr><tr><td valign="top">Enum</td><td colspan="2">Descripti</td></tr><tr><td valign="top">PAYMENT_METHOD_MSR</td><td colspan="2">For magnetic stripe cards.</td></tr><tr><td valign="top">PAYMENT_METHOD_CONTACT</td><td colspan="2">For EMV chip cards.</td></tr><tr><td valign="top">PAYMENT_METHOD_CONTACTLESS</td><td colspan="2">For NFC contactless cards.</td></tr><tr><td valign="top">PAYMENT_METHOD_MANUALENTRY</td><td colspan="2">For user to manually enter transactio access.</td></tr><tr><td valign="top">PAYMENT_METHOD_BARCODE</td><td colspan="2">For Barcode.</td></tr><tr><td valign="top"><p>PAYMENT_METHOD_BARCODE_Enc</p><p>rypted</p></td><td colspan="2">For encrypted Barcode.</td></tr><tr><td valign="top">PAYMENT_METHOD_APPLE_VAS</td><td colspan="2">For Apple VAS.</td></tr><tr><td valign="top">PAYMENT_METHOD_NFC</td><td colspan="2">For NFC tag.</td></tr><tr><td valign="top">PAYMENT_METHOD_GOOGLE_VAS</td><td colspan="2">For Ggoogle Wallet Smart Tap VAS</td></tr><tr><td colspan="3" valign="top">StatusCode.</td></tr><tr><td valign="top">data</td><td colspan="3" valign="top">Contains the data for the event.</td></tr></tbody></table>

&#x20;


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.magtek.com/sdks-and-tools/universal-sdk-documentation/linux/iconfigurationcallback-delegates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
