SessionList
Object Hierarchy:
Description:
public class SessionList : Object, ListModel
Manages session list with deduplication and fast lookup.
Implements ListModel interface using Gee.ArrayList as backing store. Provides ListStore-compatible methods that update the backing store
and emit items_changed signals. Maintains multiple hashmaps for fast lookup by id and fid.
Content:
Properties:
Creation methods:
Methods:
- public void append (SessionBase item)
Append an item to the list (ListStore-compatible). Checks for
duplicates by id before adding. Updates both id_map and fid_map.
- public bool contains (SessionBase item)
Check if an item exists in the list.
- public bool find (SessionBase item, out uint position)
Find an item in the list and return its position.
- public SessionBase? get_by_fid (string fid)
Get a session by fid using the fid_map.
- public SessionBase? get_by_id (int64 id)
Get a session by id using the id_map.
- public Object? get_item (uint position)
ListModel interface implementation: Get item at position.
- public Type get_item_type ()
ListModel interface implementation: Get the item type.
- public uint get_n_items ()
ListModel interface implementation: Get the number of items.
- public void insert (uint position, SessionBase item)
Insert an item at a specific position. Updates both id_map and
fid_map.
- public void remove (SessionBase item)
Remove an item from the list by item reference. Updates both id_map
and fid_map.
- public void remove_all ()
Remove all items from the list (ListStore-compatible).
- public void remove_at (uint position)
Remove an item at a specific position (ListStore-compatible). Updates
both id_map and fid_map.
- public void replace_at (uint position, SessionBase item, bool silent = false)
Replace an item at a specific position. Updates both id_map and
fid_map.
- public void update_fid (SessionBase session, string old_fid = "")
Update fid mapping for a session. Called when a session's fid changes.
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface GLib.ListModel