blob: 44fd3a08df639c634d7593ed3857581b179d7dde (
plain)
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
|
#include "ServerIORInterceptor.h"
#include <iostream>
char *
ServerIORInterceptor::name ()
{
return CORBA::string_dup ("ServerIORInterceptor");
}
void
ServerIORInterceptor::destroy ()
{
}
void
ServerIORInterceptor::establish_components (
PortableInterceptor::IORInfo_ptr info)
{
const char * permission = "ServerRequiresAuth";
// arbitrary tag.
CORBA::ULong tagID = 9654;
IOP::TaggedComponent myTag;
myTag.tag = tagID;
const CORBA::ULong len =
static_cast<CORBA::ULong> (ACE_OS::strlen (permission));
myTag.component_data.length (len + 1);
CORBA::Octet *buf = myTag.component_data.get_buffer();
ACE_OS::memcpy (buf, permission, len + 1);
// add tagged component
info->add_ior_component (myTag);
std::cout << "Created Tagged IOR." << std::endl;
}
void
ServerIORInterceptor::components_established (
PortableInterceptor::IORInfo_ptr /*info*/)
{
}
void
ServerIORInterceptor::adapter_manager_state_changed (
const char* /*id*/,
PortableInterceptor::AdapterState /*state*/)
{
}
void
ServerIORInterceptor::adapter_state_changed (
const PortableInterceptor::ObjectReferenceTemplateSeq& /*templates*/,
PortableInterceptor::AdapterState /*state*/)
{
}
|