TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nicotine-plus/nicotine-plus/llms.txt
Use this file to discover all available pages before exploring further.
events module provides a centralized event system for communication between components.
Events Class
Manages event subscriptions, emissions, and scheduling.Methods
enable()
connect()
Name of the event to subscribe to
Callback function to execute when event is emitted
disconnect()
Name of the event
The callback function to remove
emit()
Name of the event to emit
Positional arguments passed to callbacks
Keyword arguments passed to callbacks
emit_main_thread()
Use this method when emitting events from background threads to ensure thread safety.
schedule()
Delay in seconds before executing callback
Function to execute
Arguments to pass to callback
Whether to repeat the callback periodically
Unique identifier for the scheduled event
cancel_scheduled()
The event ID returned by schedule()
process_thread_events()
Whether the main loop should continue processing
Available Events
General Events
Application startup
Application shutdown
Initial setup/configuration screen
Server Events
Server login success or failure
Disconnected from server
Reconnecting to server
User Events
User status changed (online/away/offline)
User statistics updated
User country code determined
Chat Events
Message in chat room
Private message sent/received
Joined a chat room
Left a chat room
Search Events
New search started
Search results received
Transfer Events
Download updated
Upload updated
Download progress update
Upload progress update
Global Instance
events instance is available for import.