> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extensions

**Header:** `extensions/Include/Extensions.h`

## Structures

### `PostProcessCBData`

**Members**

<ParamField path="mPid" type="pid_t" />

<ParamField path="mSigId" type="uint32_t" />

<ParamField path="mSigType" type="uint32_t" />

<ParamField path="mNumArgs" type="int32_t" />

<ParamField path="mArgs" type="uint32_t *" />

<ParamField path="mHandleAcq" type="int64_t" />

### `Extensions`

Extensions.

#### Functions

##### `Extensions`

```cpp theme={null}
 Extensions(uint32_t resCode, int8_t callbackType, ResourceLifecycleCallback callback)
```

##### `Extensions`

```cpp theme={null}
 Extensions(ConfigType configType, std::string yamlFile)
```

##### `Extensions`

```cpp theme={null}
 Extensions(const std::string &identifier, PostProcessingCallback callback)
```

##### `getResourceApplierCallbacks`

```cpp theme={null}
std::vector< std::pair< uint32_t, ResourceLifecycleCallback > > getResourceApplierCallbacks()
```

##### `getResourceTearCallbacks`

```cpp theme={null}
std::vector< std::pair< uint32_t, ResourceLifecycleCallback > > getResourceTearCallbacks()
```

##### `getResourceConfigFilePath`

```cpp theme={null}
std::string getResourceConfigFilePath()
```

##### `getPropertiesConfigFilePath`

```cpp theme={null}
std::string getPropertiesConfigFilePath()
```

##### `getSignalsConfigFilePath`

```cpp theme={null}
std::string getSignalsConfigFilePath()
```

##### `getExtFeaturesConfigFilePath`

```cpp theme={null}
std::string getExtFeaturesConfigFilePath()
```

##### `getTargetConfigFilePath`

```cpp theme={null}
std::string getTargetConfigFilePath()
```

##### `getInitConfigFilePath`

```cpp theme={null}
std::string getInitConfigFilePath()
```

##### `getAppConfigFilePath`

```cpp theme={null}
std::string getAppConfigFilePath()
```

##### `getPostProcessingCallback`

```cpp theme={null}
PostProcessingCallback getPostProcessingCallback(const std::string &identifier)
```

## Type Definitions

### `ResourceLifecycleCallback`

```cpp theme={null}
typedef void(* ResourceLifecycleCallback
```

### `PostProcessingCallback`

```cpp theme={null}
typedef void(* PostProcessingCallback
```

## Enumerations

### `ConfigType`

Different Config (via YAML) Types supported.

#### Values

| Name                  | Value | Description |
| --------------------- | ----- | ----------- |
| `RESOURCE_CONFIG`     |       |             |
| `PROPERTIES_CONFIG`   |       |             |
| `SIGNALS_CONFIG`      |       |             |
| `EXT_FEATURES_CONFIG` |       |             |
| `TARGET_CONFIG`       |       |             |
| `INIT_CONFIG`         |       |             |
| `APP_CONFIG`          |       |             |
| `TOTAL_CONFIGS_COUNT` |       |             |

## Macros

### `CONCAT_IMPL`

```c theme={null}
#define CONCAT_IMPL a##b
```

### `CONCAT`

```c theme={null}
#define CONCAT CONCAT_IMPL(a, b)
```

### `URM_REGISTER_RES_APPLIER_CB`

Register a Customer Resource Applier Callback for a particular ResCode.

```c theme={null}
#define URM_REGISTER_RES_APPLIER_CB static Extensions CONCAT(_resourceApplier, resCode)(resCode, 0, resourceApplierCallback);
```

### `URM_REGISTER_RES_TEAR_CB`

Register a Customer Resource Teardown Callback for a particular ResCode.

```c theme={null}
#define URM_REGISTER_RES_TEAR_CB static Extensions CONCAT(_resourceTear, resCode)(resCode, 1, resourceTearCallback);
```

### `URM_REGISTER_CONFIG`

Register custom Config (YAML) file.

```c theme={null}
#define URM_REGISTER_CONFIG static Extensions CONCAT(_regConfig, configType)(configType, yamlFile);
```

### `URM_REGISTER_POST_PROCESS_CB`

Register post processing callbacks for different workloads and per-process.

```c theme={null}
#define URM_REGISTER_POST_PROCESS_CB static Extensions CONCAT(callback, __LINE__)(identifier, callback);
```
