# SympleSignaller

<a id="symplesignaller"></a>

# SympleSignaller

```cpp
#include <icy/webrtc/support/symplesignaller.h>

class SympleSignaller
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:34](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L34)

> **Inherits:** [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface)

[SignallingInterface](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) implementation using the Symple call protocol.

Speaks the `call:init`, `call:accept`, `call:reject`, `call:offer`, `call:answer`, `call:candidate`, and `call:hangup` envelope over a connected Symple client.

The remote peer identifier on this signalling boundary is the full Symple address string (`user|id`).

## List of all members

| Name | Kind | Owner |
|------|------|-------|
| [`SympleSignaller`](#symplesignaller-1) | `function` | Declared here |
| [`~SympleSignaller`](#symplesignaller-2) | `function` | Declared here |
| [`SympleSignaller`](#symplesignaller-3) | `function` | Declared here |
| [`operator=`](#operator-256) | `function` | Declared here |
| [`sendSdp`](#sendsdp-2) | `function` | Declared here |
| [`sendCandidate`](#sendcandidate-2) | `function` | Declared here |
| [`sendControl`](#sendcontrol-2) | `function` | Declared here |
| [`_client`](#_client) | `variable` | Declared here |
| [`onMessage`](#onmessage-1) | `function` | Declared here |
| [`send`](#send-21) | `function` | Declared here |
| [`SdpReceived`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sdpreceived) | `variable` | Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) |
| [`CandidateReceived`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#candidatereceived) | `variable` | Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) |
| [`ControlReceived`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#controlreceived) | `variable` | Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) |
| [`~SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface-1) | `function` | Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) |
| [`sendSdp`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendsdp) | `function` | Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) |
| [`sendCandidate`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendcandidate) | `function` | Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) |
| [`sendControl`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendcontrol) | `function` | Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface) |

## Inherited from [`SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface)

| Kind | Name | Description |
|------|------|-------------|
| `variable` | [`SdpReceived`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sdpreceived)  | Fires when an SDP offer or answer arrives from a remote peer. Parameters: peerId, type ("offer"/"answer"), sdp. |
| `variable` | [`CandidateReceived`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#candidatereceived)  | Fires when an ICE candidate arrives from a remote peer. Parameters: peerId, candidate, mid. |
| `variable` | [`ControlReceived`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#controlreceived)  | Fires when a control message arrives from a remote peer. Parameters: peerId, type ("init"/"accept"/"reject"/"hangup"), reason. |
| `function` | [`~SignallingInterface`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#signallinginterface-1) `virtual` | Defaulted destructor. |
| `function` | [`sendSdp`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendsdp) `virtual` | Send an SDP offer or answer to the remote peer. |
| `function` | [`sendCandidate`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendcandidate) `virtual` | Send an ICE candidate to the remote peer. |
| `function` | [`sendControl`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendcontrol) `virtual` | Send a control message to the remote peer. |

## Public Methods

| Return | Name | Description |
|--------|------|-------------|
|  | [`SympleSignaller`](#symplesignaller-1) `explicit` |  |
|  | [`~SympleSignaller`](#symplesignaller-2) `override` |  |
|  | [`SympleSignaller`](#symplesignaller-3)  | Deleted constructor. |
| [`SympleSignaller`](#symplesignaller) & | [`operator=`](#operator-256)  | Deleted assignment operator. |
| `void` | [`sendSdp`](#sendsdp-2) `virtual` `override` | Send an SDP offer or answer to the remote peer. |
| `void` | [`sendCandidate`](#sendcandidate-2) `virtual` `override` | Send an ICE candidate to the remote peer. |
| `void` | [`sendControl`](#sendcontrol-2) `virtual` `override` | Send a control message to the remote peer. |

---

<a id="symplesignaller-1"></a>

### SympleSignaller

`explicit`

```cpp
explicit SympleSignaller(smpl::Client & client)
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:37](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L37)

---

<a id="symplesignaller-2"></a>

### ~SympleSignaller

`override`

```cpp
~SympleSignaller() override
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:38](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L38)

---

<a id="symplesignaller-3"></a>

### SympleSignaller

```cpp
SympleSignaller(const SympleSignaller &) = delete
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:40](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L40)

Deleted constructor.

---

<a id="operator-256"></a>

### operator=

```cpp
SympleSignaller & operator=(const SympleSignaller &) = delete
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:41](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L41)

Deleted assignment operator.

---

<a id="sendsdp-2"></a>

### sendSdp

`virtual` `override`

```cpp
virtual void sendSdp(const std::string & peerId, const std::string & type, const std::string & sdp) override
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:43](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L43)

Send an SDP offer or answer to the remote peer.

#### Reimplements

- [`SignallingInterface::sendSdp`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendsdp)

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `peerId` | `const std::string &` | Remote peer identifier. |
| `type` | `const std::string &` | "offer" or "answer". |
| `sdp` | `const std::string &` | The SDP string. |

---

<a id="sendcandidate-2"></a>

### sendCandidate

`virtual` `override`

```cpp
virtual void sendCandidate(const std::string & peerId, const std::string & candidate, const std::string & mid) override
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:47](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L47)

Send an ICE candidate to the remote peer.

#### Reimplements

- [`SignallingInterface::sendCandidate`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendcandidate)

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `peerId` | `const std::string &` | Remote peer identifier. |
| `candidate` | `const std::string &` | The candidate string (from RTCIceCandidate). |
| `mid` | `const std::string &` | The sdpMid value. |

---

<a id="sendcontrol-2"></a>

### sendControl

`virtual` `override`

```cpp
virtual void sendControl(const std::string & peerId, const std::string & type, const std::string & reason = {}) override
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:51](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L51)

Send a control message to the remote peer.

#### Reimplements

- [`SignallingInterface::sendControl`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-SignallingInterface.md#sendcontrol)

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `peerId` | `const std::string &` | Remote peer identifier. |
| `type` | `const std::string &` | Control type: "init", "accept", "reject", "hangup". |
| `reason` | `const std::string &` | Optional reason string (for reject/hangup). |

## Private Attributes

| Return | Name | Description |
|--------|------|-------------|
| [`smpl::Client`](https://auscaster.com/icey/docs/api-reference/icy-smpl-Client.md#client-7) & | [`_client`](#_client)  |  |

---

<a id="_client"></a>

### _client

```cpp
smpl::Client & _client
```

Type: [`smpl::Client`](https://auscaster.com/icey/docs/api-reference/icy-smpl-Client.md#client-7) &

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:61](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L61)

## Private Methods

| Return | Name | Description |
|--------|------|-------------|
| `void` | [`onMessage`](#onmessage-1)  |  |
| `void` | [`send`](#send-21)  |  |

---

<a id="onmessage-1"></a>

### onMessage

```cpp
void onMessage(smpl::Message & msg)
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:56](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L56)

---

<a id="send-21"></a>

### send

```cpp
void send(const std::string & action, const std::string & to, const json::Value & data = {})
```

[Defined in src/webrtc/support/include/icy/webrtc/support/symplesignaller.h:57](https://github.com/auscaster/icey/blob/main/src/webrtc/support/include/icy/webrtc/support/symplesignaller.h#L57)
