NCNotification.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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, NCNotificationType) {
  7. kNCNotificationTypeRoom = 0,
  8. kNCNotificationTypeChat,
  9. kNCNotificationTypeCall,
  10. kNCNotificationTypeRecording,
  11. kNCNotificationTypeFederation
  12. };
  13. @interface NCNotification : NSObject
  14. @property (nonatomic, assign) NSInteger notificationId;
  15. @property (nonatomic, strong) NSString *app;
  16. @property (nonatomic, strong) NSString *objectId;
  17. @property (nonatomic, strong) NSString *objectType;
  18. @property (nonatomic, strong) NSString *subject;
  19. @property (nonatomic, strong) NSString *subjectRich;
  20. @property (nonatomic, strong) NSDictionary *subjectRichParameters;
  21. @property (nonatomic, strong) NSString *message;
  22. @property (nonatomic, strong) NSString *messageRich;
  23. @property (nonatomic, strong) NSDictionary *messageRichParameters;
  24. @property (nonatomic, strong) NSArray *actions;
  25. @property (nonatomic, strong) NSDate *datetime;
  26. + (instancetype)notificationWithDictionary:(NSDictionary *)notificationDict;
  27. - (NCNotificationType)notificationType;
  28. - (NSString *)chatMessageAuthor;
  29. - (NSString *)chatMessageTitle;
  30. - (NSString *)roomToken;
  31. - (NSArray *)notificationActions;
  32. @end