@class NSString, IMStateCaptureAssistant, NSMutableDictionary, NSTimer, NSNumber; @interface IMDMessageStore : NSObject <IMStateLoggable, RecordStoreProviding, RecordStoreDeleting, IMSystemMonitorListener, IMFocusStateManagerDelegate> { NSNumber *_cachedUnreadMessageCount; NSNumber *_cachedLastFailedMessageDate; BOOL _suppressedUpdates; BOOL _pendingDBUpdatePost; NSTimer *_suppressedUpdatesTimer; } @property (readonly) unsigned long long hash; @property (readonly) Class superclass; @property (readonly, copy) NSString *description; @property (readonly, copy) NSString *debugDescription; @property (retain) NSString *modificationStamp; @property (retain, nonatomic) IMStateCaptureAssistant *stateCaptureAssistant; @property (nonatomic) long long lastNotifiedUnreadCount; @property (retain, nonatomic) NSMutableDictionary *visitedChats; @property (readonly) unsigned long long hash; @property (readonly) Class superclass; @property (readonly, copy) NSString *description; @property (readonly, copy) NSString *debugDescription; + (id)sharedInstance; + (void)databaseNoLongerFull; + (void)_displayDatabaseFullAlert; + (BOOL)_updateCacheForMessageGUID:(id)a0 fromMessage:(id)a1 toMessage:(id)a2 updateLastMessage:(BOOL)a3 calculateUnreadCount:(BOOL)a4; + (void)databaseFull; + (id)_missingMessageReadReceiptCache; - (void)loadConsumedSessionPayloadsForItems:(id)a0; - (id)deleteMessagesWithChatIdentifiers:(id)a0 style:(unsigned char)a1 onServices:(id)a2; - (BOOL)markMessageGUIDUnread:(id)a0; - (void)resetLocalSyncStateIfAppropriate; - (id)updateSyndicatedMessageWithMessageGUID:(id)a0 newRange:(id)a1; - (id)itemsWithRoomNames:(id)a0 onServices:(id)a1 messageGUID:(id)a2 limit:(unsigned long long)a3; - (id)lastMessageForChatWithRowID:(long long)a0; - (id)batchOfRecordIDsToDeleteWithLimit:(long long)a0 error:(id *)a1; - (BOOL)canStoreMessage:(id)a0 onService:(id)a1; - (id)init; - (id)messageWithReplaceMessageID:(int)a0 fromHandle:(id)a1 onService:(id)a2; - (id)_messagesPendingUpdateT1ToCloudKitWithLimit:(long long)a0 attemptCount:(unsigned long long)a1; - (id)_fileTransferCenter; - (void)deleteMessagesFromTombStoneTableWithRecordIDs:(id)a0; - (void)dealloc; - (void)markMessageAsCleanWithROWID:(long long)a0; - (void)cleanseAttachments; - (void)clearTombstonesForRecordIDs:(id)a0; - (BOOL)hasStoredMessageWithGUID:(id)a0; - (void)updateFileTransfer:(id)a0; - (void)_storeAttachmentsForMessage:(id)a0; - (id)_itemsWithRoomNames:(id)a0 onServices:(id)a1 messageGUID:(id)a2 threadIdentifier:(id)a3 limit:(unsigned long long)a4 onlyMessages:(BOOL)a5; - (id)batchOfRecordsToWriteWithLimit:(long long)a0 error:(id *)a1; - (BOOL)_shouldUseBadgeUtilities; - (void)markMessageAsDeduplicated:(id)a0; - (long long)_calculateUnreadMessagesCountFilteredByFocus:(BOOL)a0 filteredByAssistiveAccess:(BOOL)a1; - (id)messageActionItemsForOriginalMessageGUID:(id)a0; - (id)_itemsForMessageRecords:(id)a0 handleID:(id)a1 useAttachmentCache:(BOOL)a2 shouldLoadAttachments:(BOOL)a3 reverseOrder:(BOOL)a4; - (id)updateSyndicatedMessageWithSyndicationMessageAction:(id)a0; - (void)_hasMarkedAllMessagesAsNeedingSync; - (id)itemsWithHandles:(id)a0 onServices:(id)a1 messageGUID:(id)a2 numberOfMessagesBefore:(unsigned long long)a3 numberOfMessagesAfter:(unsigned long long)a4 threadIdentifier:(id)a5 hasMessagesBefore:(BOOL *)a6 hasMessagesAfter:(BOOL *)a7; - (void)_resetSyncStateForMessageWithGUID:(id)a0 toState:(long long)a1; - (id)chatsForMessageGUID:(id)a0; - (void)_deleteMessagesWithGUIDs:(id)a0 chatIdentifiers:(id)a1 style:(unsigned char)a2 onServices:(id)a3 batchNumber:(unsigned long long)a4 completion:(id /* block */)a5; - (id)stateDictionaryForDiagnosticsRequest; - (id)messageWithGUID:(id)a0; - (id)messagesThatNeedSyncWithCloudKitWithLimit:(long long)a0; - (void)_updateModificationDate; - (id)updatedMessagesForMessages:(id)a0; - (id)_chatsForMessageGUID:(id)a0 enableVerboseLogging:(BOOL)a1; - (void)markMessageAsIgnoreButNeedingSyncWithROWID:(long long)a0; - (id)deleteMessagesWithReplaceMessageID:(int)a0 fromHandle:(id)a1 onService:(id)a2; - (id)_chatsForMessageIdentifier:(long long)a0; - (void)signalUnreadChangeForHandle:(id)a0; - (id)notificationContext; - (id)_messageItemsForMessageRecords:(id)a0 handleID:(id)a1 useAttachmentCache:(BOOL)a2 shouldLoadAttachments:(BOOL)a3 reverseOrder:(BOOL)a4; - (id)_unreadMessagesWithHandles:(id)a0 onServices:(id)a1 limit:(unsigned long long)a2 fallbackGUID:(id)a3; - (id)_itemsWithHandlesBeforeAndAfterGUID:(id)a0 handles:(id)a1 onServices:(id)a2 numberOfMessagesBefore:(unsigned long long)a3 numberOfMessagesAfter:(unsigned long long)a4 threadIdentifier:(id)a5 hasMessagesBefore:(BOOL *)a6 hasMessagesAfter:(BOOL *)a7; - (id)lastTUConversationItemForChat:(id)a0; - (id)_handleIDsForChat:(id)a0; - (void)_postDBUpdate; - (id)messagesWithGUIDs:(id)a0; - (id)attachmentsWithRoomNames:(id)a0 onServices:(id)a1; - (void)setSyncStatusForGUIDs:(id)a0 toStatus:(long long)a1; - (id)messagesWithReplyToGUID:(id)a0; - (id)itemsWithHandles:(id)a0 onServices:(id)a1 messageGUID:(id)a2 threadIdentifier:(id)a3 limit:(unsigned long long)a4; - (void)deleteMessageFromSpotlightWithGUID:(id)a0; - (void)registerTransfersWithGUIDs:(id)a0 forMessageGUID:(id)a1; - (id)itemsWithRoomNames:(id)a0 onServices:(id)a1 limit:(unsigned long long)a2; - (id)chatsForMessage:(id)a0; - (BOOL)isSuppressDatabaseUpdates; - (id)storeMessage:(id)a0 forceReplace:(BOOL)a1 modifyError:(BOOL)a2 modifyFlags:(BOOL)a3 flagMask:(unsigned long long)a4 updateMessageCache:(BOOL)a5 calculateUnreadCount:(BOOL)a6; - (id)storeItem:(id)a0 forceReplace:(BOOL)a1; - (id)existingChatForMessageGUID:(id)a0; - (BOOL)canStoreItem:(id)a0 onService:(id)a1; - (BOOL)_isValidPhoneNumber:(id)a0 forCountryCode:(id)a1; - (void)setSuppressDatabaseUpdates:(BOOL)a0; - (void)__postDBUpdate; - (id)itemsWithRoomNames:(id)a0 onServices:(id)a1 messageGUID:(id)a2 threadIdentifier:(id)a3 limit:(unsigned long long)a4; - (id)_updateAssociatedMessageItemsFromMessage:(id)a0 toMessage:(id)a1; - (void)recordUpdateFailedWithID:(id)a0 localGUID:(id)a1 error:(id)a2; - (id)attachmentsWithHandles:(id)a0 onServices:(id)a1; - (id)itemWithGUID:(id)a0; - (id)frequentRepliesForForChatIdentifiers:(id)a0 onServices:(id)a1 limit:(unsigned long long)a2; - (id)unreadMessagesWithRoomNames:(id)a0 onServices:(id)a1 limit:(unsigned long long)a2 fallbackGUID:(id)a3; - (id)storeMessage:(id)a0 forceReplace:(BOOL)a1 modifyError:(BOOL)a2 modifyFlags:(BOOL)a3 flagMask:(unsigned long long)a4; - (id)markMessagesAsReadWithIdentifiers:(id)a0 onServices:(id)a1 chatStyle:(unsigned char)a2 upToGUID:(id)a3 readDate:(id)a4 fromMe:(BOOL)a5; - (BOOL)_hasMessagesWithGUIDs:(id)a0; - (BOOL)_itemClassShouldUpdateTransferForItem:(id)a0; - (long long)lastFailedMessageDate; - (id)cleanUnformattedPhoneNumber:(id)a0 countryCode:(id)a1; - (BOOL)wasMessageDeduplicatedWithGUID:(id)a0; - (id)itemsWithHandles:(id)a0 onServices:(id)a1 limit:(unsigned long long)a2; - (void)postUrgentNotificationsForMessageGUIDs:(id)a0; - (id)lastMessageWithRoomNames:(id)a0 onServices:(id)a1; - (id)lastMessageWithHandles:(id)a0 onServices:(id)a1; - (void)updateStamp; - (id)existingMessageSimilarToMessage:(id)a0 skipServices:(id)a1 skipGUIDs:(id)a2 withinTimeInterval:(double)a3 participants:(id)a4; - (void)_performBlock:(id /* block */)a0 afterDelay:(double)a1; - (long long)unreadMessagesCount; - (id)messagesWithAssociatedGUID:(id)a0; - (void)rebuildUnreadMessageCount; - (id)copyMessagesThatNeedToBeDeletedInCloudKitWithLimit:(unsigned long long)a0; - (id)chatForMessageIdentifier:(long long)a0; - (id)replaceMessageAcknowledgmentsWithNewMessageAcknowledgment:(id)a0 associatedMessageGUID:(id)a1 sender:(id)a2; - (id)messagesInChat:(id)a0 earliestDate:(id)a1 limit:(unsigned long long)a2; - (void).cxx_destruct; - (id)deleteMessagesWithChatIdentifiers:(id)a0 style:(unsigned char)a1 onServices:(id)a2 completion:(id /* block */)a3; - (id)chatForMessageGUID:(id)a0 enableVerboseLogging:(BOOL)a1; - (id)chatForMessage:(id)a0; - (id)markMessagesAsReadWithChatGUIDs:(id)a0 upToGUID:(id)a1 readDate:(id)a2 fromMe:(BOOL)a3; - (void)_needsToMarkAllMessagesAsNeedingSync; - (id)itemsWithHandles:(id)a0 onServices:(id)a1 messageGUID:(id)a2 limit:(unsigned long long)a3; - (id)messageWithGUID:(id)a0 registerAttachments:(BOOL)a1; - (void)clearMessagesTombStoneTable; - (void)retractPostedNotificationsForMessagesMatchingChatGUIDs:(id)a0; - (id)unreadMessagesWithHandles:(id)a0 onServices:(id)a1 limit:(unsigned long long)a2 fallbackGUID:(id)a3; - (id)messagesWithAssociatedGUID:(id)a0 shouldLoadAttachments:(BOOL)a1; - (id)_itemsWithAssociatedGUID:(id)a0 shouldLoadAttachments:(BOOL)a1; - (id)existingSOSMessageSimilarToMessage:(id)a0 matchingService:(id)a1 withinTimeInterval:(double)a2; - (id)syncTokenStore; - (id)_messagesThatNeedSyncWithCloudKitWithLimit:(long long)a0 attemptCount:(unsigned long long)a1; - (id)chatForMessageGUID:(id)a0; - (void)updatePostedNotificationsForMessageGUIDs:(id)a0; - (void)_suppressDBUpdateTimerFired; - (id)_itemsWithHandles:(id)a0 onServices:(id)a1 messageGUID:(id)a2 threadIdentifier:(id)a3 limit:(unsigned long long)a4 onlyMessages:(BOOL)a5; - (id)storeMessage:(id)a0 forceReplace:(BOOL)a1 modifyError:(BOOL)a2 modifyFlags:(BOOL)a3 flagMask:(unsigned long long)a4 updateMessageCache:(BOOL)a5 calculateUnreadCount:(BOOL)a6 reindexMessage:(BOOL)a7 force:(BOOL)a8; - (id)_cleanupPhoneNumber:(id)a0; - (BOOL)isAttachmentReferencedByMessage:(id)a0; - (void)databaseChatSpamUpdated:(id)a0; - (void)rebuildLastFailedMessageDate; - (BOOL)updateSyndicatedMessageWithMessageItem:(id)a0 newRange:(id)a1; - (void)performInitialHousekeeping; - (void)clearLocalSyncState:(unsigned long long)a0; - (void)recordUpdateSucceededWithRecord:(id)a0; - (id)_logAllUnreadMessages; - (void)legacyImport:(id)a0; - (id)_chatRegistrySharedInstance; - (id)deleteMessageGUIDs:(id)a0 inChat:(id)a1; - (id)storeEditedMessage:(id)a0 editedPartIndex:(long long)a1 editType:(unsigned long long)a2 previousMessage:(id)a3 chat:(id)a4 updatedAssociatedMessageItems:(id *)a5; - (void)resolveUnformattedRepresentationsForHandles:(id)a0 onService:(id)a1 message:(id)a2 completionBlock:(id /* block */)a3; - (void)updateUnformattedID:(id)a0 forBuddyID:(id)a1 onService:(id)a2; - (void)markAllMessagesAsNeedingCloudKitSync; - (id)_handleStringsForChat:(id)a0; - (void)addMissingMessageReadReceipt:(id)a0; - (BOOL)popReadReceiptForMissingGUID:(id)a0; - (id)storeMessage:(id)a0 forceReplace:(BOOL)a1 modifyError:(BOOL)a2 modifyFlags:(BOOL)a3 flagMask:(unsigned long long)a4 updateMessageCache:(BOOL)a5 calculateUnreadCount:(BOOL)a6 reindexMessage:(BOOL)a7; - (void)_notifyWidgetKitTimeline:(long long)a0; - (BOOL)_shouldMarkAllMessagesAsNeedingSync; - (void)focusStateDidChange; - (id)_fileTransferGUIDsInMessageBody:(id)a0; - (id)messagesPendingUpdateT1ToCloudKitWithLimit:(long long)a0; - (void)postCountChanges; - (id)_messagesPendingUpdateT2ToCloudKitWithLimit:(long long)a0 attemptCount:(unsigned long long)a1; - (struct _IMDHandleRecordStruct { struct __CFRuntimeBase { unsigned long long x0; _Atomic unsigned long long x1; } x0; long long x1; struct __CFArray *x2; } *)_copyHandle:(id)a0 onService:(id)a1; - (long long)lastSyncedMessageRowID; - (id)_itemsWithGUIDs:(id)a0; - (id)deleteMessageGUIDs:(id)a0; - (id)messagesPendingUpdateT2ToCloudKitWithLimit:(long long)a0; - (id)_unreadMessagesWithRoomNames:(id)a0 onServices:(id)a1 limit:(unsigned long long)a2 fallbackGUID:(id)a3; - (void)retractPostedNotificationsForMessageGUIDs:(id)a0; @end