Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tcf-dev] [Bug 286455] New: [tcf][agent] Plug-in system and cmdline client enhancement

https://bugs.eclipse.org/bugs/show_bug.cgi?id=286455  
Product/Component: Target Management / TCF
           Summary: [tcf][agent] Plug-in system and cmdline client
                    enhancement
           Product: Target Management
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: TCF
        AssignedTo: dsdp.tm.tcf-inbox@xxxxxxxxxxx
        ReportedBy: michael.sills.lavoie@xxxxxxxxx
         QAContact: martin.oberhuber@xxxxxxxxxxxxx
                CC: eugene.tarassov@xxxxxxxxxxxxx


This patch enhances the tcf agent plug-in system.  It adds the possibility to
share functions between plug-ins, or between services and plug-ins, at run
time, by adding the plugin_add_function and plugin_get_function functions. To
create this system, I had to modify the plugins_load function to load the
plug-ins in a deterministic order. From now on, the plug-in system will load
the plug-ins alphabetically.
By doing that, we are able to manage the initialization's dependencies between
the different plug-ins in a way that is similar to the Linux rc.d directory
(load the different script alphabetically). If a plug-in is loaded and a
plug-in to witch it depends is not, it will know it when it will try to get the
function that it needs from the plugin_get_function and it will be able to
notify the user by writing an error message.
This way, one is able to load the plug-ins in the right order to share some
functions. To dynamically share a function, a plug-in/service calls
plugin_add_function with the function name and the function pointer (ex.
plugin_add_function("MyPlugin_foo", foo)).

I also modified the Cmdline service to offer the possibility to add commands at
run time with plug-ins. A plug-in can also registers itself to the service to
be notify when a new connection is initialized or when a channel is
disconnected.

What do you think about it ?

Legal Message: I, Michael Sills-Lavoie, declare that I developed attached code
from scratch, without referencing any 3rd party materials except material
licensed under the EPL and EDL. I am authorized by my employer, École
Polytechnique de Montréal, to make this contribution under the EPL and EDL.

The École Polytechnique de Montréal is a member of the Eclipse Associate and
Eclipse Membership At Large communities.


-- 
Configure bugmail: https://bugs.eclipse.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

Back to the top