LCOV - code coverage report
Current view: top level - lib/src/utils - event_update.dart (source / functions) Coverage Total Hit
Test: merged.info Lines: 100.0 % 1 1
Test Date: 2025-01-14 13:39:53 Functions: - 0 0

            Line data    Source code
       1              : /*
       2              :  *   Famedly Matrix SDK
       3              :  *   Copyright (C) 2019, 2020, 2021 Famedly GmbH
       4              :  *
       5              :  *   This program is free software: you can redistribute it and/or modify
       6              :  *   it under the terms of the GNU Affero General Public License as
       7              :  *   published by the Free Software Foundation, either version 3 of the
       8              :  *   License, or (at your option) any later version.
       9              :  *
      10              :  *   This program is distributed in the hope that it will be useful,
      11              :  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
      12              :  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      13              :  *   GNU Affero General Public License for more details.
      14              :  *
      15              :  *   You should have received a copy of the GNU Affero General Public License
      16              :  *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
      17              :  */
      18              : 
      19              : enum EventUpdateType {
      20              :   /// Newly received events from /sync
      21              :   timeline,
      22              : 
      23              :   /// A state update not visible in the timeline currently
      24              :   state,
      25              : 
      26              :   /// Messages that have been fetched when requesting past history
      27              :   history,
      28              : 
      29              :   /// The state of an invite
      30              :   inviteState,
      31              : 
      32              :   /// Events that came down timeline, but we only received the keys for it later so we send a second update for them in the decrypted state
      33              :   decryptedTimelineQueue,
      34              : }
      35              : 
      36              : @Deprecated('Use `Event` class directly instead.')
      37              : class EventUpdate {
      38              :   /// Usually 'timeline', 'state' or whatever.
      39              :   final EventUpdateType type;
      40              : 
      41              :   /// Most events belong to a room. If not, this equals to eventType.
      42              :   final String roomID;
      43              : 
      44              :   // The json payload of the content of this event.
      45              :   final Map<String, dynamic> content;
      46              : 
      47           34 :   EventUpdate({
      48              :     required this.roomID,
      49              :     required this.type,
      50              :     required this.content,
      51              :   });
      52              : }
        

Generated by: LCOV version 2.0-1