OsmoVTY: Bind two more C structs to smalltalK
This commit is contained in:
parent
2eaed1fe27
commit
9ad895dc0d
53
OsmoVTY.st
53
OsmoVTY.st
|
@ -12,6 +12,43 @@ CStruct subclass: vty_app_info [
|
|||
#(#is_config_node #(#ptr #int))) >
|
||||
]
|
||||
|
||||
CStruct subclass: vty_vector [
|
||||
<category: 'libosmovty'>
|
||||
<comment: 'I am the struct _vector class'>
|
||||
"the index is wrong but we do not need to access it"
|
||||
<declaration: #(
|
||||
#(#active #uInt)
|
||||
#(#alloced #uInt)
|
||||
#(#index #(#ptr #int))) >
|
||||
]
|
||||
|
||||
CStruct subclass: vty_cmd_element [
|
||||
<category: 'libosmovty'>
|
||||
<comment: 'I represent the lowlevel command'>
|
||||
<declaration: #(
|
||||
#(#name #string)
|
||||
#(#func #(#ptr #int))
|
||||
#(#doc #string)
|
||||
#(#daemon #int)
|
||||
#(#strvec #(#ptr #{vty_vector}))
|
||||
#(#cmdsize #uInt)
|
||||
#(#config #string)
|
||||
#(#subconfig #(#ptr #{vty_vector}))
|
||||
#(#attr #uChar))>
|
||||
]
|
||||
|
||||
CStruct subclass: vty_cmd_node [
|
||||
<comment: 'I provide access to a cmd_node'>
|
||||
<category: 'libosmovty'>
|
||||
|
||||
<declaration: #(
|
||||
#(#node #int)
|
||||
#(#prompt #string)
|
||||
#(#vtysh #int)
|
||||
#(#func #(#ptr #int))
|
||||
#(#cmd_vector #(#ptr #{vty_vector}))) >
|
||||
]
|
||||
|
||||
Object subclass: OSMOVTY [
|
||||
<comment: 'I provide access to the VTY code'>
|
||||
<category: 'libosmovty'>
|
||||
|
@ -32,6 +69,22 @@ Object subclass: OSMOVTY [
|
|||
<cCall: 'telnet_init' returning: #int args: #(#cObject #cObject #int) >
|
||||
]
|
||||
|
||||
OSMOVTY class >> install_node: aNode func: aFunc [
|
||||
<cCall: 'install_node' returning: #void args: #(#cObject #cObject) >
|
||||
]
|
||||
|
||||
OSMOVTY class >> install_default: aNode [
|
||||
<cCall: 'install_default' returning: #void args: #(#int) >
|
||||
]
|
||||
|
||||
OSMOVTY class >> install_element: aNode cmd: aCmd [
|
||||
<cCall: 'install_element' returning: #void args: #(#int #{vty_cmd_element}) >
|
||||
]
|
||||
|
||||
OSMOVTY class >> install_element_ve: aCmd [
|
||||
<cCall: 'install_element_ve' returning: #void args: #(#{vty_cmd_element}) >
|
||||
]
|
||||
|
||||
OSMOVTY class >> initWith: aName version: aVersion license: aLicense port: aPort [
|
||||
| app_info |
|
||||
|
||||
|
|
Reference in New Issue