source: trunk/third/bonobo-activation/test/bonobo-activation-testplugin.c @ 18311

Revision 18311, 1.2 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18310, which included commits to RCS files with non-trunk default branches.
Line 
1#include <bonobo-activation/bonobo-activation.h>
2
3#include "plugin.h"
4
5static gpointer bonobo_activation_plugin_impl_ptr = NULL;
6
7static void
8plugin_test_impl (PortableServer_Servant  servant,
9                  CORBA_Environment      *ev)
10{
11        bonobo_activation_plugin_unuse (bonobo_activation_plugin_impl_ptr);
12}
13
14static PortableServer_ServantBase__epv base_epv = {
15        NULL,
16        NULL,
17        NULL
18};
19
20static POA_Plugin__epv plugin_epv = {
21        NULL,
22        plugin_test_impl
23};
24
25static POA_Plugin__vepv plugin_vepv = {
26        &base_epv,
27        &plugin_epv
28};
29
30static POA_Plugin plugin_servant = {
31        NULL,
32        &plugin_vepv
33};
34
35static CORBA_Object
36activate_plugin (PortableServer_POA  poa,
37                 const char         *iid,
38                 gpointer            impl_ptr,
39                 CORBA_Environment  *ev)
40{
41        CORBA_Object objref;
42
43        POA_Plugin__init (&plugin_servant, ev);
44
45        bonobo_activation_plugin_use (&plugin_servant, impl_ptr);
46
47        bonobo_activation_plugin_impl_ptr = impl_ptr;
48
49        objref = PortableServer_POA_servant_to_reference (poa,
50                                                          &plugin_servant,
51                                                          ev);
52
53        return objref;
54}
55
56static BonoboActivationPluginObject plugin_list[] = {
57        {"OAFIID:Plugin:20010713", activate_plugin},
58        {NULL}
59};
60
61const  BonoboActivationPlugin Bonobo_Plugin_info = {
62        plugin_list,
63        "Bonobo Activation Test Plugin"
64};
Note: See TracBrowser for help on using the repository browser.