All pastes #447468 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-19 01:50 UTC
rendered paste body
static void load_modules(llof_mlist *modules, xmlNode *modules_node)
{
    xmlNode *module_node = modules_node->children;
    while(module_node != NULL)
    {
        // Get the attributes from module_node and add a module to the modules linked list.
        
        xmlNode *function_node = module_node->children;
        while(function_node != NULL)
        {
            // Get the attributes from function_node and add a function to the function linked list
            // inside of the new module you just added.
            
            function_node = function_node->next;
        }
        
        // Go to the next module.
        module_node = module_node->next;
    }
}


<modules>
    <module name="openvz">
        <function api_call="create_vz" symbol="vzctl_create" role="foo,bar" ret_type="1" argc="1" />
        <function api_call="destroy_vz" symbol="vzctl_destory" role="foo,bar" ret_type="1" argc="1" />
    </module>
    <module name="IRC">
        <function api_call="irc_connect" symbol="connect" role="bar,foo" ret_type="1" argc="1" />
    </module>
</modules>