diff options
| author | luwenpeng <[email protected]> | 2022-08-09 16:00:06 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2022-08-10 10:19:22 +0800 |
| commit | 9df6bf07af341a2878363302408102a6856c6bbc (patch) | |
| tree | f95edf761c4bfdcedd09e73147c82794522000ee /readme.md | |
| parent | 0f7468b9946e29e19cd8a6f8c63e6949e29b9b02 (diff) | |
Modify the implementation of the plugin manager take over
A plugin that is taken over, if the plugin was called before being taken over
and has a registered SESSION_EVENT_CLOSING event,
it will be called again when the SESSION_EVENT_CLOSING event comes.
Otherwise, the plugin will not be called.
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -48,12 +48,18 @@ Plugin Management APIs pm_session_dettach_me(session); /* - * The current plugin takes over the current session, the pm_session_take_over setting flag disables other plugins, + * The current plugin(cb2) takes over the current session, the pm_session_take_over setting flag disables other plugins, * and the current session does not call other plugins except for the SESSION_EVENT_CLOSING event. * - * The current plugin may be taken over while the session is open (SESSION_EVENT_OPENING), - * other plugins event_cb is not called, the session pme on other plugins is NULL, - * When the session is closed (SESSION_EVENT_CLOSING), call other plugin even_cb to destroy pme must check if pme is NULL. + * +-----+ +-----+ +-----+ +-----+ + * Plugin runtime callback list: | cb1 |-->| cb2 |-->| cb3 |-->| cb4 | + * +-----+ +-----+ +-----+ +-----+ + * /|\ + * | + * plugin cb2 run pm_session_take_over + * + * A plugin(cb1/cb3/cb4) that is taken over, if the plugin was called before being taken over and has a registered SESSION_EVENT_CLOSING event, + * it will be called again when the SESSION_EVENT_CLOSING event comes. Otherwise, the plugin will not be called. */ pm_session_take_over(session); ``` |
