NCRoomParticipant.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: GPL-3.0-or-later
  4. */
  5. #import <Foundation/Foundation.h>
  6. typedef NS_ENUM(NSInteger, NCParticipantType) {
  7. kNCParticipantTypeOwner = 1,
  8. kNCParticipantTypeModerator,
  9. kNCParticipantTypeUser,
  10. kNCParticipantTypeGuest,
  11. kNCParticipantTypeUserSelfJoined,
  12. kNCParticipantTypeGuestModerator
  13. };
  14. extern NSString * const NCAttendeeTypeUser;
  15. extern NSString * const NCAttendeeTypeGroup;
  16. extern NSString * const NCAttendeeTypeCircle;
  17. extern NSString * const NCAttendeeTypeGuest;
  18. extern NSString * const NCAttendeeTypeEmail;
  19. extern NSString * const NCAttendeeTypeFederated;
  20. extern NSString * const NCAttendeeBridgeBotId;
  21. @interface NCRoomParticipant : NSObject
  22. @property (nonatomic, assign) NSInteger attendeeId;
  23. @property (nonatomic, copy) NSString *actorType;
  24. @property (nonatomic, copy) NSString *actorId;
  25. @property (nonatomic, copy) NSString *displayName;
  26. @property (nonatomic, assign) NSInteger inCall;
  27. @property (nonatomic, assign) NSInteger lastPing;
  28. @property (nonatomic, assign) NCParticipantType participantType;
  29. @property (nonatomic, copy) NSString *sessionId; // Deprecated in Conversations APIv4
  30. @property (nonatomic, copy) NSArray *sessionIds;
  31. @property (nonatomic, copy) NSString *userId; // Deprecated in Conversations APIv3
  32. @property (nonatomic, copy) NSString *status;
  33. @property (nonatomic, copy) NSString *statusIcon;
  34. @property (nonatomic, copy) NSString *statusMessage;
  35. @property (nonatomic, copy) NSString *callIconImageName;
  36. + (instancetype)participantWithDictionary:(NSDictionary *)userDict;
  37. - (BOOL)canModerate;
  38. - (BOOL)canBePromoted;
  39. - (BOOL)canBeDemoted;
  40. - (BOOL)isBridgeBotUser;
  41. - (BOOL)isGuest;
  42. - (BOOL)isGroup;
  43. - (BOOL)isCircle;
  44. - (BOOL)isOffline;
  45. - (BOOL)isFederated;
  46. - (NSString *)detailedName;
  47. - (NSString *)participantId;
  48. @end