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

# sdiplugin.h

[Go to the documentation of this file.](/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/sdiplugin_8h.md)

```cpp
 1 // -*- Mode: C++ -*-
 2 #ifndef SDI_PLUGIN_H_20181001
 3 #define SDI_PLUGIN_H_20181001
 4 
 7 #include <vector>
 8 
 9 
 10 #define CLA_PLUGIN_CMD 0x26 
 11 
 12 
 14 class SDIPlugin
 15 {
 16  public:
 17 
 19  typedef std::vector<unsigned char> Buffer;
 20 
 22  enum SDITrigger
 23  {
 24  SDITrigger_None = 0,
 25  SDITrigger_CardDetected = 1 << 0,
 26  SDITrigger_EMVConfig = 1 << 1,
 27  SDITrigger_SDIConfig = 1 << 2,
 28  SDITrigger_CardDataAvail = 1 << 3,
 29  SDITrigger_MsgDataAvail = 1 << 4,
 30  SDITrigger_EmvCndListCbk = 1 << 5,
 31  SDITrigger_CardId = 1 << 6,
 32  SDITrigger_FactoryReset = 1 << 7,
 34  SDITrigger_ExternalCSD = 1 << 8,
 35  SDITrigger_ExtDataStore = 1 << 9,
 43  SDITrigger_ManualPan = 1 << 10,
 44  SDITrigger_CTLSSmartISO = 1 << 11
 45  };
 46 
 48  enum SDIExtension
 49  {
 50  SDIExt_TrustedConnection = 0,
 55  SDIExt_PCI_Version = 1,
 59  SDIExt_VCL_Callback = 4
 63  };
 64 
 65 
 67  virtual ~SDIPlugin() {}
 68 
 70  virtual const char *name() const = 0;
 71 
 77  virtual void version(int &major, int &minor, int &patch) const = 0;
 78 
 82  virtual int moduleID() const = 0;
 83 
 86  virtual unsigned supportedTriggers() const = 0;
 87 
 100  virtual int processMessage(Buffer &result, int cmd, const Buffer &message) = 0;
 101 
 102 
 110  virtual int processTrigger(Buffer &result, unsigned triggerID, const Buffer &message) = 0;
 111 
 112  //
 113  //virtual int cardInsert(Buffer &result, unsigned cardType, const Buffer &atr, const Buffer &track1, const Buffer &track2, const Buffer &track3);
 114  //
 115 
 120  virtual void *openExtension(int ext_number) = 0;
 121 
 125  virtual void closeExtension(void *extension) = 0;
 126 };
 127 
 128 
 132 extern "C" {
 133  __attribute__((visibility("default"))) SDIPlugin *getSDIPlugin();
 134 }
 135 
 151 typedef void (* Vcl_Encryption_Callback)(void *data, unsigned short* size, void *context);
 152 
 153 
 162 typedef void (* Vcl_Encryption_Callback_Setter)(Vcl_Encryption_Callback cb, void *context);
 163 
 164 #endif
```


---

# 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/sdiplugin_8h_source.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.
