Ring Daemon 16.0.0
Loading...
Searching...
No Matches
streamdata.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2025 Savoir-faire Linux Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18#include <string>
19#include <map>
20
21enum class StreamType { audio, video };
22
29{
37 StreamData(const std::string& callId,
38 bool isReceived,
39 const StreamType& mediaType,
40 const std::string& conversationId,
41 const std::string& accountId)
42 : id {std::move(callId)}
43 , direction {isReceived}
44 , type {mediaType}
45 , source {std::move(accountId)}
46 , conversation {std::move(conversationId)}
47 {}
48 // callId
49 const std::string id;
50 // False if local audio/video.
51 const bool direction;
52 // StreamType -> audio or video.
54 // accountId
55 const std::string source;
56 // conversationId
57 const std::string conversation;
58};
59
66{
74 JamiMessage(const std::string& accId,
75 const std::string& pId,
76 bool isReceived,
77 const std::map<std::string, std::string>& dataMap,
78 bool pPlugin)
79 : accountId {accId}
80 , peerId {pId}
81 , direction {isReceived}
82 , data {dataMap}
83 , fromPlugin {pPlugin}
84 {}
85
86 std::string accountId;
87 std::string peerId;
88 // True if it's a received message.
89 const bool direction;
90 std::map<std::string, std::string> data;
91 // True if message is originated from Plugin code.
93 bool isSwarm {false};
94 bool fromHistory {false};
95};
StreamType
Definition streamdata.h:21
Contains information about an exchanged message.
Definition streamdata.h:66
bool fromHistory
Definition streamdata.h:94
JamiMessage(const std::string &accId, const std::string &pId, bool isReceived, const std::map< std::string, std::string > &dataMap, bool pPlugin)
Definition streamdata.h:74
std::map< std::string, std::string > data
Definition streamdata.h:90
const bool direction
Definition streamdata.h:89
std::string accountId
Definition streamdata.h:86
bool fromPlugin
Definition streamdata.h:92
std::string peerId
Definition streamdata.h:87
Contains information about an AV subject.
Definition streamdata.h:29
const std::string source
Definition streamdata.h:55
const bool direction
Definition streamdata.h:51
const std::string conversation
Definition streamdata.h:57
const std::string id
Definition streamdata.h:49
const StreamType type
Definition streamdata.h:53
StreamData(const std::string &callId, bool isReceived, const StreamType &mediaType, const std::string &conversationId, const std::string &accountId)
Definition streamdata.h:37