1
0
Fork 0

OsmoVTY: Bind two more C structs to smalltalK

This commit is contained in:
Holger Hans Peter Freyther 2010-09-11 17:12:59 +08:00
parent 2eaed1fe27
commit 9ad895dc0d
1 changed files with 53 additions and 0 deletions

View File

@ -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 |