Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
signalapp
GitHub Repository: signalapp/Signal-iOS
Path: blob/main/SignalServiceKit/Calls/Group/OWSGroupCallMessage.h
1 views
1
//
2
// Copyright 2018 Signal Messenger, LLC
3
// SPDX-License-Identifier: AGPL-3.0-only
4
//
5
6
#import <SignalServiceKit/OWSReadTracking.h>
7
#import <SignalServiceKit/TSInteraction.h>
8
9
NS_ASSUME_NONNULL_BEGIN
10
11
@class AciObjC;
12
@class TSGroupThread;
13
14
/// Represents a group call-related update that lives in chat history.
15
///
16
/// Not to be confused with an ``OutgoingGroupCallUpdateMessage``.
17
@interface OWSGroupCallMessage : TSInteraction
18
19
/// The ACI-string of the creator of the call.
20
/// - Note
21
/// May be `nil` if we were unable to peek the call.
22
/// - Note
23
/// The name contains `Uuid` for SDS compatibility, but this is an ACI.
24
@property (nonatomic, nullable) NSString *creatorUuid;
25
@property (nonatomic, readonly, nullable) AciObjC *creatorAci;
26
27
/// The ACI-strings of the members of the call.
28
/// - Note
29
/// May be empty if we were unable to peek the call.
30
/// - Note
31
/// The name contains `Uuid` for SDS compatibility, but these are ACIs.
32
@property (nonatomic, nullable) NSArray<NSString *> *joinedMemberUuids;
33
@property (nonatomic, readonly) NSArray<AciObjC *> *joinedMemberAcis;
34
35
/// Whether the call has been ended, or is still in-progress.
36
@property (nonatomic) BOOL hasEnded;
37
38
/// Whether this call has been read, or is "unread".
39
/// - SeeAlso ``OWSReadTracking``
40
@property (nonatomic, getter=wasRead) BOOL read;
41
42
/// This property is deprecated, but remains here to preserve compatibility with
43
/// legacy data. Specifically, it will only be populated on old messages -
44
/// recent messages will instead have a corresponding ``CallRecord`` storing a
45
/// "call ID".
46
@property (nonatomic, readonly, nullable) NSString *eraId;
47
48
- (instancetype)initWithCustomUniqueId:(NSString *)uniqueId
49
timestamp:(uint64_t)timestamp
50
receivedAtTimestamp:(uint64_t)receivedAtTimestamp
51
thread:(TSThread *)thread NS_UNAVAILABLE;
52
- (instancetype)initWithTimestamp:(uint64_t)timestamp
53
receivedAtTimestamp:(uint64_t)receivedAtTimestamp
54
thread:(TSThread *)thread NS_UNAVAILABLE;
55
- (instancetype)initWithGrdbId:(int64_t)grdbId
56
uniqueId:(NSString *)uniqueId
57
receivedAtTimestamp:(uint64_t)receivedAtTimestamp
58
sortId:(uint64_t)sortId
59
timestamp:(uint64_t)timestamp
60
uniqueThreadId:(NSString *)uniqueThreadId NS_UNAVAILABLE;
61
62
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
63
64
- (instancetype)initWithJoinedMemberAcis:(NSArray<AciObjC *> *)joinedMemberAcis
65
creatorAci:(nullable AciObjC *)creatorAci
66
thread:(TSGroupThread *)thread
67
sentAtTimestamp:(uint64_t)sentAtTimestamp NS_DESIGNATED_INITIALIZER;
68
69
// --- CODE GENERATION MARKER
70
71
// This snippet is generated by /Scripts/sds_codegen/sds_generate.py. Do not manually edit it, instead run
72
// `sds_codegen.sh`.
73
74
// clang-format off
75
76
- (instancetype)initWithGrdbId:(int64_t)grdbId
77
uniqueId:(NSString *)uniqueId
78
receivedAtTimestamp:(uint64_t)receivedAtTimestamp
79
sortId:(uint64_t)sortId
80
timestamp:(uint64_t)timestamp
81
uniqueThreadId:(NSString *)uniqueThreadId
82
creatorUuid:(nullable NSString *)creatorUuid
83
eraId:(nullable NSString *)eraId
84
hasEnded:(BOOL)hasEnded
85
joinedMemberUuids:(nullable NSArray<NSString *> *)joinedMemberUuids
86
read:(BOOL)read
87
NS_DESIGNATED_INITIALIZER NS_SWIFT_NAME(init(grdbId:uniqueId:receivedAtTimestamp:sortId:timestamp:uniqueThreadId:creatorUuid:eraId:hasEnded:joinedMemberUuids:read:));
88
89
// clang-format on
90
91
// --- CODE GENERATION MARKER
92
93
@end
94
95
NS_ASSUME_NONNULL_END
96
97