NCPushNotification.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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, NCPushNotificationType) {
  7. NCPushNotificationTypeUnknown,
  8. NCPushNotificationTypeCall,
  9. NCPushNotificationTypeRoom,
  10. NCPushNotificationTypeChat,
  11. NCPushNotificationTypeDelete,
  12. NCPushNotificationTypeDeleteAll,
  13. NCPushNotificationTypeDeleteMultiple,
  14. NCPushNotificationTypeAdminNotification,
  15. NCPushNotificationTypeRecording,
  16. NCPUshNotificationTypeFederation,
  17. NCPushNotificationTypeReminder
  18. };
  19. extern NSString * const kNCPNAppKey;
  20. extern NSString * const kNCPNAppIdKey;
  21. extern NSString * const kNCPNTypeKey;
  22. extern NSString * const kNCPNSubjectKey;
  23. extern NSString * const kNCPNIdKey;
  24. extern NSString * const kNCPNNotifIdKey;
  25. extern NSString * const kNCPNTypeCallKey;
  26. extern NSString * const kNCPNTypeRoomKey;
  27. extern NSString * const kNCPNTypeChatKey;
  28. extern NSString * const kNCPNTypeRecording;
  29. extern NSString * const kNCPNTypeReminder;
  30. extern NSString * const NCPushNotificationJoinChatNotification;
  31. extern NSString * const NCPushNotificationJoinAudioCallAcceptedNotification;
  32. extern NSString * const NCPushNotificationJoinVideoCallAcceptedNotification;
  33. @interface NCPushNotification : NSObject
  34. @property (nonatomic, copy) NSString *app;
  35. @property (nonatomic, assign) NCPushNotificationType type;
  36. @property (nonatomic, copy) NSString *subject;
  37. @property (nonatomic, copy) NSString *roomToken;
  38. @property (nonatomic, assign) NSInteger notificationId;
  39. @property (nonatomic, strong) NSArray *notificationIds;
  40. @property (nonatomic, copy) NSString *accountId;
  41. @property (nonatomic, copy) NSString *jsonString;
  42. @property (nonatomic, copy) NSString *responseUserText;
  43. + (instancetype)pushNotificationFromDecryptedString:(NSString *)decryptedString withAccountId:(NSString *)accountId;
  44. - (NSString *)bodyForRemoteAlerts;
  45. @end