Signal-iOS/SignalServiceKit/Calls/Group/OWSGroupCallMessage.h
2023-08-23 23:47:14 -05:00

81 lines
3.3 KiB
Objective-C

//
// Copyright 2018 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
#import <SignalServiceKit/OWSReadTracking.h>
#import <SignalServiceKit/TSInteraction.h>
NS_ASSUME_NONNULL_BEGIN
@class AciObjC;
@class TSGroupThread;
/// Represents a group call-related update that lives in chat history.
///
/// Not to be confused with an ``OutgoingGroupCallUpdateMessage``.
@interface OWSGroupCallMessage : TSInteraction <OWSReadTracking, OWSPreviewText>
// Can be nil if we weren't able to peek the call.
@property (nonatomic, readonly, nullable) SignalServiceAddress *creatorAddress;
@property (nonatomic, readonly) NSArray<SignalServiceAddress *> *joinedMemberAddresses;
@property (nonatomic, readonly) BOOL hasEnded;
- (instancetype)initWithUniqueId:(NSString *)uniqueId
timestamp:(uint64_t)timestamp
thread:(TSThread *)thread NS_UNAVAILABLE;
- (instancetype)initWithUniqueId:(NSString *)uniqueId
timestamp:(uint64_t)timestamp
receivedAtTimestamp:(uint64_t)receivedAtTimestamp
thread:(TSThread *)thread NS_UNAVAILABLE;
- (instancetype)initInteractionWithTimestamp:(uint64_t)timestamp thread:(TSThread *)thread NS_UNAVAILABLE;
- (instancetype)initWithGrdbId:(int64_t)grdbId
uniqueId:(NSString *)uniqueId
receivedAtTimestamp:(uint64_t)receivedAtTimestamp
sortId:(uint64_t)sortId
timestamp:(uint64_t)timestamp
uniqueThreadId:(NSString *)uniqueThreadId NS_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithEraId:(NSString *)eraId
joinedMemberAcis:(NSArray<AciObjC *> *)joinedMemberAcis
creatorAci:(nullable AciObjC *)creatorAci
thread:(TSGroupThread *)thread
sentAtTimestamp:(uint64_t)sentAtTimestamp NS_DESIGNATED_INITIALIZER;
// --- CODE GENERATION MARKER
// This snippet is generated by /Scripts/sds_codegen/sds_generate.py. Do not manually edit it, instead run
// `sds_codegen.sh`.
// clang-format off
- (instancetype)initWithGrdbId:(int64_t)grdbId
uniqueId:(NSString *)uniqueId
receivedAtTimestamp:(uint64_t)receivedAtTimestamp
sortId:(uint64_t)sortId
timestamp:(uint64_t)timestamp
uniqueThreadId:(NSString *)uniqueThreadId
creatorUuid:(nullable NSString *)creatorUuid
eraId:(nullable NSString *)eraId
hasEnded:(BOOL)hasEnded
joinedMemberUuids:(nullable NSArray<NSString *> *)joinedMemberUuids
read:(BOOL)read
NS_DESIGNATED_INITIALIZER NS_SWIFT_NAME(init(grdbId:uniqueId:receivedAtTimestamp:sortId:timestamp:uniqueThreadId:creatorUuid:eraId:hasEnded:joinedMemberUuids:read:));
// clang-format on
// --- CODE GENERATION MARKER
- (NSString *)systemTextWithTransaction:(SDSAnyReadTransaction *)transaction;
- (void)updateWithHasEnded:(BOOL)hasEnded transaction:(SDSAnyWriteTransaction *)transaction;
- (void)updateWithJoinedMemberAcis:(NSArray<AciObjC *> *)joinedMemberAcis
creatorAci:(AciObjC *)creatorAci
tx:(SDSAnyWriteTransaction *)tx;
@end
NS_ASSUME_NONNULL_END