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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
%typemap(javaimports) RobotRaconteur::ServerContext
%{
import java.util.*;
%}
%typemap(javacode) RobotRaconteur::ServerContext
%{
//public delegate void ServerServiceListenerDelegate(ServerContext service, ServerServiceListenerEventType ev, object parameter);
public void setServiceAttributes(Map<String,Object> attributes)
{
MessageElement m = new MessageElement("value",RobotRaconteurNode.s().packVarType(attributes));
_SetServiceAttributes(m);
}
/*
public void AddServerServiceListener(ServerServiceListenerDelegate listener)
{
ServerServiceListenerDirectorJava d = new ServerServiceListenerDirectorJava(this, listener);
d.objectheapid = RRObjectHeap.addObject(d);
_AddServerServiceListener(d);
}*/
public void releaseServicePath(String path)
{
_ReleaseServicePath(path);
}
public void releaseServicePath(String path, long[] endpoints)
{
vectoruint32 o=new vectoruint32();
for(int i=0; i<endpoints.length; i++)
{
o.add(endpoints[i]);
}
_ReleaseServicePath(path,o);
}
%}
%typemap("javaimports") RobotRaconteur::AuthenticatedUser
%{
import java.util.*;
%}
%typemap("javacode") RobotRaconteur::AuthenticatedUser
%{
public String getUsername()
{
return _GetUsername();
}
public String[] getPrivileges()
{
vectorstring in=_GetPrivileges();
String[] o=new String[(int)in.size()];
for (int i=0; i<o.length; i++)
{
o[i]=in.get(i);
}
return o;
}
public String[] getProperties()
{
vectorstring in=_GetProperties();
String[] o=new String[(int)in.size()];
for (int i=0; i<o.length; i++)
{
o[i]=in.get(i);
}
return o;
}
public TimeSpec getLoginTime()
{
return _GetLoginTime();
}
public TimeSpec getLastAccessTime()
{
return _GetLastAccessTime();
}
%}
%include "Service.i"
|