-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.h
64 lines (49 loc) · 1.98 KB
/
server.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef __PORBIT_SERVER_H__
#define __PORBIT_SERVER_H__
#include "porbit-perl.h"
#include <orb/orbit.h>
typedef struct _PORBitServant PORBitServant;
typedef struct _PORBitInstVars PORBitInstVars;
struct _PORBitServant {
void *_private;
PortableServer_ServantBase__vepv *vepv;
SV *perlobj;
CORBA_InterfaceDef_FullInterfaceDescription *desc;
};
/* Information attached to a Perl servant via '~' magic
*/
struct _PORBitInstVars
{
U32 magic; /* 0x18981972 */
PortableServer_Servant servant;
};
/* Magically add an InstVars structure to a perl servant */
PORBitInstVars * porbit_instvars_add (SV *perl_obj);
/* Get the InstVars structure for an object */
PORBitInstVars * porbit_instvars_get (SV *perl_obj);
/* Callback when perl servant is destroyed */
void porbit_instvars_destroy (PORBitInstVars *instvars);
/* Find or create a Perl object for the given servant */
SV * porbit_servant_to_sv (PortableServer_Servant servant);
/* Given a Perl object which is a descendant of CORBA::Object, find
* or create the corresponding C servant.
*/
PortableServer_Servant porbit_sv_to_servant (SV *perl_obj);
/* Ref and unref the Perl object corresponding to a servant
*/
void porbit_servant_ref (PortableServer_Servant servant);
void porbit_servant_unref (PortableServer_Servant servant);
PORBitServant *porbit_servant_create (SV *perlobj,
CORBA_Environment *ev);
void porbit_servant_destroy (PORBitServant *servant,
CORBA_Environment *ev);
/* Check if the CORBA interface a server implements, derives
* from the given repository ID
*/
gboolean porbit_servant_is_a (SV *perlobj,
const char *repo_id);
/* Convert between SV * and PortableServer_ObjectId
*/
PortableServer_ObjectId *porbit_sv_to_objectid (SV *sv);
SV *porbit_objectid_to_sv (PortableServer_ObjectId *oid);
#endif /* __PORBIT_SERVER_H__ */