home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 December
/
PCWorld_2000-12_cd.bin
/
Komunikace
/
Comanche
/
plugins
/
samba
/
init.tcl
< prev
next >
Wrap
Text File
|
2000-11-02
|
3KB
|
73 lines
set currentDir [file dirname [file join [pwd] [info script]]]
source [file join $currentDir samba.tcl]
source [file join $currentDir lib sambaParser.tcl]
source [file join $currentDir lib sambaDumper.tcl]
source [file join $currentDir lib utils.tcl]
proc samba_init {args} {
array set options $args
set xuiB [ \
xuiBuilder ::#auto [list \
boolean [booleanCreator ::#auto] \
string [stringCreator ::#auto] \
structure [structureCreator ::#auto] \
alternate [alternateCreator ::#auto] \
choice [choiceCreator ::#auto] \
list [listCreator ::#auto] \
group [groupCreator ::#auto] \
propertyPage [propertyPageCreator ::#auto] \
propertyPages [propertyPagesCreator ::#auto] \
dirDefinition [dirDefinitionCreator ::#auto] \
label [labelCreator ::#auto] \
number [numberCreator ::#auto] \
]]
set sambappM [ppManager ::#auto ]
set sambaConfDoc [confDocument ::#auto]
set sambaDirDef [dirDefinition ::#auto ]
set sambaRootNode [[::plugInUtils::getChildByClass $options(-namespace) \
root networkServices] getId]
# To do: Clean up this mess and do it Apache style
foreach file {{../plugins/samba/xmlDirDef/samba.xml}} {
set f [open $file]
set sambaDoc [$xuiB renderDocument [dom::DOMImplementation \
parse [read $f]]]
close $f
$sambaDirDef addDirectiveDefinition $sambaDoc
}
sambaParser smb $sambaDirDef $sambaConfDoc
smb configure -mainConfFile $::comanche::globals(smb.conf)
smb init
$xuiB addCreator directiveInclude \
[includeCreator ::#auto $sambaDirDef]
set f [open ../plugins/samba/xmlPP/newbiePP.xml]
set sambaDoc [$xuiB renderDocument \
[dom::DOMImplementation parse [read $f]]]
close $f
set sambappdef [pPDefinition ::#auto ]
$sambappdef addPPDefinition $sambaDoc
set myPg [sambaPlugIn ::#auto ]
set sambanm [nodeManagement ::#auto ::ns $myPg]
$myPg configure -namespace ::ns -nodeManagement $sambanm -confDoc\
$sambaConfDoc -ppManager $sambappM -ppDef $sambappdef \
-dumper [sambaPrettyDumper ::#auto] -rootNode $sambaRootNode
$myPg _registerWithNamespace
$myPg init
}
proc samba_info {} {
array set info {description {Module for configuring the Samba File and \
Print services}}
array set info {name {samba}}
array set info {version {1.0}}
array set info {icon samba}
return [array get info]
}