> 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/annotated/class_s_d_i_plugin.md).

# SDIPlugin

[Public Types](#pub-types) | [Public Member Functions](#pub-methods)

`#include <`[sdiplugin.h](/s-adk-5.1-programmers-guide/sdiplugin_8h_source.md)`>`

|                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Public Types                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| enum                                 | <p><a href="#a82c0da164c73dfba432f58136b1d3dab">SDITrigger</a> {<br>  <a href="#a82c0da164c73dfba432f58136b1d3daba3322b03f5963b663a7fd42a897370404">SDITrigger\_None</a> = 0, <a href="#a82c0da164c73dfba432f58136b1d3dabab2f1a65967bfd3e2c5573ea39496636f">SDITrigger\_CardDetected</a> = 1 << 0, <a href="#a82c0da164c73dfba432f58136b1d3daba7d1ebf14a6c946b0963f21f9bbe8b99c">SDITrigger\_EMVConfig</a> = 1 << 1, <a href="#a82c0da164c73dfba432f58136b1d3daba48be46d570bed852705c3d424341c5c4">SDITrigger\_SDIConfig</a> = 1 << 2,<br>  <a href="#a82c0da164c73dfba432f58136b1d3dabad1d714b962d5eec01039433e2c1b2558">SDITrigger\_CardDataAvail</a> = 1 << 3, <a href="#a82c0da164c73dfba432f58136b1d3daba5cbb4bc092032e68369de6e7723c939c">SDITrigger\_MsgDataAvail</a> = 1 << 4, <a href="#a82c0da164c73dfba432f58136b1d3dabae58d3b43266eada5e017367c38778779">SDITrigger\_EmvCndListCbk</a> = 1 << 5, <a href="#a82c0da164c73dfba432f58136b1d3daba674dc789b9f584d8ce1632184ca3163b">SDITrigger\_CardId</a> = 1 << 6,<br>  <a href="#a82c0da164c73dfba432f58136b1d3daba85c7dbf695f606dedbdd8805638f1832">SDITrigger\_FactoryReset</a> = 1 << 7, <a href="#a82c0da164c73dfba432f58136b1d3dabafe2a2ccb7d75044bde896b7be1701c6c">SDITrigger\_ExternalCSD</a> = 1 << 8, <a href="#a82c0da164c73dfba432f58136b1d3daba2d3b27869247ee3f0437c4136d9e5040">SDITrigger\_ExtDataStore</a> = 1 << 9, <a href="#a82c0da164c73dfba432f58136b1d3dabae84cca0164725d42b3e18131887f703d">SDITrigger\_ManualPan</a> = 1 << 10,<br>  <a href="#a82c0da164c73dfba432f58136b1d3dababb43247f17838bb28862e8af4113c136">SDITrigger\_CTLSSmartISO</a> = 1 << 11<br>}</p> |
| enum                                 | [SDIExtension](#ac54b73bc0f666acecb26aec563933dab) { [SDIExt\_TrustedConnection](#ac54b73bc0f666acecb26aec563933dabaf68f9bf3b8cf2c74c727593f815b2ad5) = 0, [SDIExt\_PCI\_Version](#ac54b73bc0f666acecb26aec563933daba06c111cc8a22f1561b77db6fc6ce4273) = 1, [SDIExt\_VCL\_Callback](#ac54b73bc0f666acecb26aec563933dabadfaf20e6f6b758be305a019675c7b015) = 4 }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| typedef std::vector< unsigned char > | [Buffer](#a8f502862992b828150656db48c9ce5fc)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

|                         |                                                                                                                                                                                                  |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Public Member Functions |                                                                                                                                                                                                  |
| virtual                 | [\~SDIPlugin](#ac61cfcf3cd3dab4e87ac55016184d452) ()                                                                                                                                             |
| virtual const char \*   | [name](#a1a30ad8f276a2310571c36239554831a) () const =0                                                                                                                                           |
| virtual void            | [version](#a796f4754af60a767410df08daef5dc06) (int \&major, int \&minor, int \&patch) const =0                                                                                                   |
| virtual int             | [moduleID](#a8d2bc1f2997927e41cff153194099c40) () const =0                                                                                                                                       |
| virtual unsigned        | [supportedTriggers](#ae369ce7304446cc914cb2f62a3f22307) () const =0                                                                                                                              |
| virtual int             | [processMessage](#a3c7b193aa5b72dc9e8a627619230cf2f) ([Buffer](#a8f502862992b828150656db48c9ce5fc) \&result, int cmd, const [Buffer](#a8f502862992b828150656db48c9ce5fc) \&message)=0            |
| virtual int             | [processTrigger](#a0f730d467656f854300839d8013f9205) ([Buffer](#a8f502862992b828150656db48c9ce5fc) \&result, unsigned triggerID, const [Buffer](#a8f502862992b828150656db48c9ce5fc) \&message)=0 |
| virtual void \*         | [openExtension](#aae0f81c75ffaeacd5af7bbe3b4b86062) (int ext\_number)=0                                                                                                                          |
| virtual void            | [closeExtension](#a07bbd9c2e7fc03a0f408560bf09d7091) (void \*extension)=0                                                                                                                        |

### DetailedDescription <a href="#detailed-description" id="detailed-description"></a>

Abstract [SDIPlugin](/s-adk-5.1-programmers-guide/readme/annotated/class_s_d_i_plugin.md) base class

### MemberTypedef Documentation <a href="#member-typedef-documentation" id="member-typedef-documentation"></a>

### Buffer <a href="#a8f502862992b828150656db48c9ce5fc" id="a8f502862992b828150656db48c9ce5fc"></a>

typedef std::vector\ \[Buffer]\(#a8f502862992b828150656db48c9ce5fc)

buffer type

### MemberEnumeration Documentation <a href="#member-enumeration-documentation" id="member-enumeration-documentation"></a>

### SDIExtension <a href="#ac54b73bc0f666acecb26aec563933dab" id="ac54b73bc0f666acecb26aec563933dab"></a>

enum \[SDIExtension]\(#ac54b73bc0f666acecb26aec563933dab)

SDI plugin extensions

|                           |                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enumerator                |                                                                                                                                                                                                                                                                                                                                                                                                               |
| SDIExt\_TrustedConnection | Provide the information to the plugin if the SDI connection is trusted or not. This is actually used for trigger SDITrigger\_EMVConfig. The [openExtension()](#aae0f81c75ffaeacd5af7bbe3b4b86062) returns a pointer to bool in that case. !!! NOTE: SDIExt\_TrustedConnection is DEPRECATED and no longer invoked by SDI !!!                                                                                  |
| SDIExt\_PCI\_Version      | Obtain PCI version of the plugin (if available). [openExtension()](#aae0f81c75ffaeacd5af7bbe3b4b86062) call returns C-string (const char\*) containing PCI version string. If there is no PCI versioning for the plugin, NULL is returned.                                                                                                                                                                    |
| SDIExt\_VCL\_Callback     | Provide a function pointer (of type Vcl\_Encryption\_Callback\_Setter) for VCL encryption by SDI. This is used for plugins that register for trigger SDITrigger\_ExtDataStore. [openExtension()](#aae0f81c75ffaeacd5af7bbe3b4b86062) call returns a function pointer for which SDI will set the callback function for VCL encryption. If this functionality is not supported by the plugin, NULL is returned. |

### SDITrigger <a href="#a82c0da164c73dfba432f58136b1d3dab" id="a82c0da164c73dfba432f58136b1d3dab"></a>

enum \[SDITrigger]\(#a82c0da164c73dfba432f58136b1d3dab)

SDI plugin trigger IDs in the form 1<\<n

|                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enumerator                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| SDITrigger\_None          | No trigger                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| SDITrigger\_CardDetected  | Card has been swiped after a card request was sent (2301)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| SDITrigger\_EMVConfig     | EMV config command issued by the application                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| SDITrigger\_SDIConfig     | SDI config file upload command issued by the application                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| SDITrigger\_CardDataAvail | SDI server has detected track equivalent 2 data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| SDITrigger\_MsgDataAvail  | SDI server has created host message data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| SDITrigger\_EmvCndListCbk | EMV Reduce Candidate List callback has been called                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| SDITrigger\_CardId        | SDI server delivers a PAN to generate a unique Card Id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| SDITrigger\_FactoryReset  | SDI server performs a factory reset and requests the plugin the delete persistent data (e.g. files created during runtime) and to do a reinitialization with defaults                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| SDITrigger\_ExternalCSD   | Provide extern entered PAN to the SDI server for PIN block generation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| SDITrigger\_ExtDataStore  | <p>Cardholder Sensitive Data not available in the SDI Data Store, try to get them from the plugin Following tags are provided to the plugin:</p><p>F0/DF3B: Options, 4 bytes. Byte 4 bit 1: Clear text flag. Relevant only in case VTP is enabled If set to true and VTP is enabled, the plugin has to deliver clear text data (VTP decrypted) Per default, when VTP is enabled, the plugin has to deliver VTP encrypted data. Byte 4 bit 2: Request to clear sensitive data. Called by SDI Server on a Clear Data Store 29-03 command</p><p>F0/DF3C: Requested tags, array with 4 bytes for each tag</p> |
| SDITrigger\_ManualPan     | Provide entered PAN during manual card data entry for further processing, e.g whitelist check                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| SDITrigger\_CTLSSmartISO  | Redirect EMV\_CTLS\_SmartISO to the plugin instead of EMV ADK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

### Constructor& Destructor Documentation

### \~SDIPlugin() <a href="#ac61cfcf3cd3dab4e87ac55016184d452" id="ac61cfcf3cd3dab4e87ac55016184d452"></a>

virtual \\\~[SDIPlugin](/s-adk-5.1-programmers-guide/readme/annotated/class_s_d_i_plugin.md)

inlinevirtual

Destructor

### MemberFunction Documentation <a href="#member-function-documentation" id="member-function-documentation"></a>

### closeExtension() <a href="#a07bbd9c2e7fc03a0f408560bf09d7091" id="a07bbd9c2e7fc03a0f408560bf09d7091"></a>

virtual void closeExtension

pure virtual

close extension

**Parameters**

\[in] **extension** pointer as returned from openExtension

### moduleID() <a href="#a8d2bc1f2997927e41cff153194099c40" id="a8d2bc1f2997927e41cff153194099c40"></a>

virtual int moduleID

pure virtual

obtain module ID that identifies the plugin (parameter p1 in the SDI interface)

#### Returns

module ID

### name() <a href="#a1a30ad8f276a2310571c36239554831a" id="a1a30ad8f276a2310571c36239554831a"></a>

virtual const char\\\* name

pure virtual

#### Returns

String containing the name of the plugin

### openExtension() <a href="#aae0f81c75ffaeacd5af7bbe3b4b86062" id="aae0f81c75ffaeacd5af7bbe3b4b86062"></a>

virtual void\\\* openExtension

pure virtual

open extension. Extensions need to be closed using [closeExtension()](#a07bbd9c2e7fc03a0f408560bf09d7091) when no longer needed.

**Parameters**

\[in] **ext\_number** extension number

#### Returns

pointer to extension or NULL if the extension is not known

### processMessage() <a href="#a3c7b193aa5b72dc9e8a627619230cf2f" id="a3c7b193aa5b72dc9e8a627619230cf2f"></a>

virtual int processMessage

pure virtual

process SDI message sent by application

**Parameters**

\[out] **result** buffer containing the result of the operation. The plugin shall write the SW1/SW2 bytes in the first two bytes of the buffer, followed by the data to be returned to the application. It's recommended to use BER-TLV format for encoding the returned data, and enclose the data in tag F0. If the plugin does not return the SW1/SW2 bytes then SDI will ignore the result buffer and return 6802 ("Invalid result returned from the plugin") to the application. \[in] **cmd** P1 parameter in the SDI interface that identifies the function \[in] **message** input message recommended is to use BER-TLV format for encoding the content of the buffer

#### Returns

result code, e.g. 0x9000 for OK

### processTrigger() <a href="#a0f730d467656f854300839d8013f9205" id="a0f730d467656f854300839d8013f9205"></a>

virtual int processTrigger

pure virtual

process trigger ID invoked from SDI server

**Parameters**

\[out] **result** buffer containing the result of the operation, recommended is to use BER-TLV format for encoding the content of the buffer \[in] **triggerID** trigger ID \[in] **message** input input format depends on the triggerID.

#### Returns

result code, e.g. 0x9000 for OK

### supportedTriggers() <a href="#ae369ce7304446cc914cb2f62a3f22307" id="ae369ce7304446cc914cb2f62a3f22307"></a>

virtual unsigned supportedTriggers

pure virtual

#### Returns

trigger ID mask that are supported by this plugin. This is the or-ed value of all supported SDITriggers.

### version() <a href="#a796f4754af60a767410df08daef5dc06" id="a796f4754af60a767410df08daef5dc06"></a>

virtual void version

pure virtual

obtain version information

**Parameters**

\[out] **major** major version \[out] **minor** minor version \[out] **patch** patch version

***

The documentation for this class was generated from the following file:

* sdi/src/[sdiplugin.h](/s-adk-5.1-programmers-guide/sdiplugin_8h_source.md)


---

# 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/annotated/class_s_d_i_plugin.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.
