# QSH client API workflow

The QSH-exposed APIs are called QSH client APIs for
applications. The client applications interact with the QSH framework available on the
low-power processor. The following figure shows the detailed breakdown and
usage of the QSH client APIs:

<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="768" height="801.47" viewbox="0 0 768 801.47" aria-label="Figure : QSH client API workflow">
  <defs>
    <style>.svg-1 .cls-1 { letter-spacing: 0em }
.svg-1 .cls-2,.svg-1 .cls-3,.svg-1 .cls-4 { font-family: Roboto-Bold, Roboto; font-weight: 700 }
.svg-1 .cls-2,.svg-1 .cls-4,.svg-1 .cls-5 { font-size: 15px }
.svg-1 .cls-2,.svg-1 .cls-6 { letter-spacing: .06em }
.svg-1 .cls-7,.svg-1 .cls-8,.svg-1 .cls-9,.svg-1 .cls-10,.svg-1 .cls-11 { stroke-miterlimit: 10 }
.svg-1 .cls-7,.svg-1 .cls-8,.svg-1 .cls-11 { stroke: #000 }
.svg-1 .cls-7,.svg-1 .cls-10,.svg-1 .cls-11 { fill: none }
.svg-1 .cls-3 { font-size: 16px }
.svg-1 .cls-12 { letter-spacing: -.01em }
.svg-1 .cls-13 { font-size: 18.58px }
.svg-1 .cls-13,.svg-1 .cls-5 { font-family: Roboto-Regular, Roboto }
.svg-1 .cls-14 { letter-spacing: .05em }
.svg-1 .cls-8 { fill: #fff; stroke-width: 2px }
.svg-1 .cls-9 { stroke: #d2d7e1 }
.svg-1 .cls-9,.svg-1 .cls-15 { fill: #fafafa }
.svg-1 .cls-10 { stroke: #7c8aa3; stroke-width: 1.5px }
.svg-1 .cls-11 { stroke-dasharray: 4.98 4.98 }
.svg-1 .cls-16 { letter-spacing: .05em }
.svg-1 .cls-17 { letter-spacing: 0em }</style>
  </defs>
  <rect class="cls-9" x="9.27" y="8.38" width="749.47" height="784.62" rx="2.21" ry="2.21"></rect>
  <text class="cls-2" transform="translate(103.97 286.25)"><tspan x="0" y="0">[perSUID]</tspan></text>
  <text class="cls-4" transform="translate(107.6 462.31)"><tspan class="cls-6" x="0" y="0">[sensor</tspan><tspan class="cls-16" x="56.35" y="0">E</tspan><tspan class="cls-14" x="65.5" y="0">v</tspan><tspan class="cls-6" x="73.89" y="0">ent]</tspan></text>
  <text class="cls-3" transform="translate(46.79 286.85)"><tspan x="0" y="0">Opt</tspan></text>
  <rect class="cls-10" x="29.91" y="267.21" width="712.67" height="260.91" rx="1.91" ry="1.91"></rect>
  <rect class="cls-10" x="47.4" y="443.57" width="677.68" height="68.38" rx=".95" ry=".95"></rect>
  <polyline class="cls-10" points="94.92 267.21 94.92 287.73 84.6 298.05 29.91 298.05"></polyline>
  <text class="cls-3" transform="translate(57.57 462.91)"><tspan x="0" y="0">loop</tspan></text>
  <polyline class="cls-10" points="99.91 443.57 99.91 463.03 91.52 473.35 47.07 473.35"></polyline>
  <rect class="cls-8" x="152.26" y="19.37" width="144.4" height="49.54" rx="4.13" ry="4.13"></rect>
  <rect class="cls-8" x="514.16" y="19.37" width="228.42" height="49.54" rx="5.19" ry="5.19"></rect>
  <line class="cls-7" x1="224.46" y1="68.9" x2="224.46" y2="727.66"></line>
  <line class="cls-7" x1="628.36" y1="68.9" x2="628.36" y2="727.66"></line>
  <text class="cls-13" transform="translate(177.85 48.96)"><tspan x="0" y="0">Application</tspan></text>
  <text class="cls-13" transform="translate(536.07 48.96)"><tspan x="0" y="0">libSensingHubSession</tspan></text>
  <rect class="cls-8" x="152.26" y="727.66" width="144.4" height="49.54" rx="4.13" ry="4.13"></rect>
  <rect class="cls-8" x="514.16" y="727.66" width="228.42" height="49.54" rx="5.19" ry="5.19"></rect>
  <text class="cls-13" transform="translate(177.85 757.25)"><tspan x="0" y="0">Application</tspan></text>
  <text class="cls-13" transform="translate(536.07 757.25)"><tspan x="0" y="0">libSensingHubSession</tspan></text>
  <g>
    <line class="cls-7" x1="224.46" y1="112.63" x2="622.62" y2="112.63"></line>
    <polygon points="621.46 116.62 628.36 112.63 621.46 108.64 621.46 116.62"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="224.46" y1="202.12" x2="622.62" y2="202.12"></line>
    <polygon points="621.46 206.11 628.36 202.12 621.46 198.14 621.46 206.11"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="224.46" y1="556.68" x2="622.62" y2="556.68"></line>
    <polygon points="621.46 560.67 628.36 556.68 621.46 552.69 621.46 560.67"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="224.46" y1="291.62" x2="622.62" y2="291.62"></line>
    <polygon points="621.46 295.61 628.36 291.62 621.46 287.63 621.46 295.61"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="224.46" y1="381.12" x2="622.62" y2="381.12"></line>
    <polygon points="621.46 385.11 628.36 381.12 621.46 377.13 621.46 385.11"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="230.2" y1="157.38" x2="232.7" y2="157.38"></line>
    <line class="cls-11" x1="237.68" y1="157.38" x2="623.38" y2="157.38"></line>
    <line class="cls-7" x1="625.86" y1="157.38" x2="628.36" y2="157.38"></line>
    <polygon points="231.37 161.37 224.46 157.38 231.37 153.39 231.37 161.37"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="230.2" y1="246.87" x2="232.7" y2="246.87"></line>
    <line class="cls-11" x1="237.68" y1="246.87" x2="623.38" y2="246.87"></line>
    <line class="cls-7" x1="625.86" y1="246.87" x2="628.36" y2="246.87"></line>
    <polygon points="231.37 250.86 224.46 246.87 231.37 242.88 231.37 250.86"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="230.2" y1="336.37" x2="232.7" y2="336.37"></line>
    <line class="cls-11" x1="237.68" y1="336.37" x2="623.38" y2="336.37"></line>
    <line class="cls-7" x1="625.86" y1="336.37" x2="628.36" y2="336.37"></line>
    <polygon points="231.37 340.36 224.46 336.37 231.37 332.38 231.37 340.36"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="230.2" y1="425.87" x2="232.7" y2="425.87"></line>
    <line class="cls-11" x1="237.68" y1="425.87" x2="623.38" y2="425.87"></line>
    <line class="cls-7" x1="625.86" y1="425.87" x2="628.36" y2="425.87"></line>
    <polygon points="231.37 429.86 224.46 425.87 231.37 421.88 231.37 429.86"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="230.2" y1="477.76" x2="232.7" y2="477.76"></line>
    <line class="cls-11" x1="237.68" y1="477.76" x2="623.38" y2="477.76"></line>
    <line class="cls-7" x1="625.86" y1="477.76" x2="628.36" y2="477.76"></line>
    <polygon points="231.37 481.75 224.46 477.76 231.37 473.77 231.37 481.75"></polygon>
  </g>
  <g>
    <line class="cls-7" x1="230.2" y1="601.43" x2="232.7" y2="601.43"></line>
    <line class="cls-11" x1="237.68" y1="601.43" x2="623.38" y2="601.43"></line>
    <line class="cls-7" x1="625.86" y1="601.43" x2="628.36" y2="601.43"></line>
    <polygon points="231.37 605.42 224.46 601.43 231.37 597.44 231.37 605.42"></polygon>
  </g>
  <g>
    <path class="cls-7" d="M224.46,646.18h66.78c11.02,0,19.95,8.93,19.95,19.95h0c0,11.02-8.93,19.95-19.95,19.95h-59.6"></path>
    <polygon points="233.1 681.09 224.46 686.08 233.1 691.07 233.1 681.09"></polygon>
  </g>
  <rect class="cls-15" x="385" y="103.06" width="82.83" height="19.14"></rect>
  <rect class="cls-15" x="387.87" y="147.8" width="77.1" height="19.14"></rect>
  <rect class="cls-15" x="399.56" y="192.55" width="53.71" height="19.14"></rect>
  <rect class="cls-15" x="380.3" y="237.3" width="92.23" height="19.14"></rect>
  <rect class="cls-15" x="378.23" y="282.05" width="96.36" height="19.14"></rect>
  <rect class="cls-15" x="382.02" y="326.8" width="88.79" height="19.14"></rect>
  <rect class="cls-15" x="378.23" y="371.55" width="96.36" height="19.14"></rect>
  <rect class="cls-15" x="382.02" y="416.3" width="88.79" height="19.14"></rect>
  <rect class="cls-15" x="380.3" y="468.19" width="92.23" height="19.14"></rect>
  <rect class="cls-15" x="399.91" y="547.11" width="53.02" height="19.14"></rect>
  <text class="cls-5" transform="translate(389.39 116.85)"><tspan x="0" y="0">getSession</tspan></text>
  <text class="cls-5" transform="translate(395.33 161.6)"><tspan x="0" y="0">Isession*</tspan></text>
  <text class="cls-5" transform="translate(408.94 206.35)"><tspan x="0" y="0">Open</tspan></text>
  <text class="cls-5" transform="translate(402.42 560.9)"><tspan x="0" y="0">Close()</tspan></text>
  <text class="cls-5" transform="translate(383.18 295.84)"><tspan x="0" y="0">setCallBacks</tspan></text>
  <text class="cls-5" transform="translate(382.93 385.34)"><tspan x="0" y="0">sendRequest</tspan></text>
  <text class="cls-5" transform="translate(385.44 251.1)"><tspan x="0" y="0">success/fail</tspan></text>
  <text class="cls-5" transform="translate(385.44 340.59)"><tspan x="0" y="0">success/fail</tspan></text>
  <text class="cls-5" transform="translate(385.44 430.09)"><tspan x="0" y="0">success/fail</tspan></text>
  <text class="cls-5" transform="translate(385.44 481.98)"><tspan x="0" y="0">sensor</tspan><tspan class="cls-12" x="45.32" y="0">E</tspan><tspan class="cls-1" x="53.66" y="0">v</tspan><tspan class="cls-17" x="60.83" y="0">ent</tspan></text>
  <text class="cls-5" transform="translate(109.72 649.57)"><tspan x="0" y="0">delete ISession*</tspan></text>
</svg>

**Figure: QSH client API workflow**

The following list describes the QSH client APIs:

- `getSession()`: To interact with the QSH, the sensor application client must create
an interface session by invoking the `getSession()` API. Successful creation of the interface session returns an
`ISession*` object to the client.
- `open()`, `close()`, `setCallback()`, and `sendRequest()`: The interface that `getSession()` API creates operates on a
*once\_per\_session* basis. This interface allows the client application to
use the QSH client APIs, such as `open()`, `close()`,
`setCallback()`, and `sendRequest()`, until the session is
explicitly deleted using the `close()` and `delete()` APIs.

    After the interface session establishes, the client application or the
client code can open a sensor session by calling the `open()` API.
Similar to `getSession()`, the `open()` API is also invoked on a
*once\_per\_session* basis. The `setCallback()` and
`sendRequest()` APIs are invoked once for a specified SUID.

**Next steps**

> 
> 
> [Develop applications using the QSH client APIs](https://docs.qualcomm.com/doc/80-80022-7/topic/develop_app.html#develop-app)

Last Published: May 07, 2026

[Previous Topic
Develop with client APIs](https://docs.qualcomm.com/bundle/publicresource/80-80022-7/topics/develop_client_apis.md) [Next Topic
Develop applications using the QSH client APIs](https://docs.qualcomm.com/bundle/publicresource/80-80022-7/topics/develop_app.md)