<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi List,<br>
<br>
I'm new in asterisk development, and I need to change something in
our module, because the module was developed for asterisk 1.4.<br>
The problem from where I can't move out:<br>
In our old 1.4 module was a definition:<br>
FUNCTION_STATIC(Function, funcName, synopsis, syntax, description)<br>
Function * Function::_instance = 0;<br>
struct ast_custom_function
Function::function =<br>
{ <br>
funcName, //const char *<br>
synopsis, //const char *<br>
syntax, //const char *<br>
description, //const char
*<br>
FuncReadWrapper<Function>, <br>
FuncWriteWrapper<Function><br>
};<br>
<br>
But in the asterisk version 1.6 we must use the ast_custom_function
like this:<br>
<br>
struct ast_custom_function {<br>
const char *name; /*!< Name */<br>
AST_DECLARE_STRING_FIELDS(<br>
AST_STRING_FIELD(synopsis); /*!< Synopsis
text for 'show functions' */<br>
AST_STRING_FIELD(desc); /*!< Description
(help text) for 'show functions &lt;name&gt;' */<br>
AST_STRING_FIELD(syntax); /*!< Syntax text
for 'core show functions' */<br>
AST_STRING_FIELD(arguments); /*!< Arguments
description */<br>
AST_STRING_FIELD(seealso); /*!< See also */<br>
);<br>
enum ast_doc_src docsrc; /*!< Where the
documentation come from */<br>
ast_acf_read_fn_t read; /*!< Read function, if
read is supported */<br>
ast_acf_write_fn_t write; /*!< Write function, if
write is supported */<br>
struct ast_module *mod; /*!< Module this custom
function belongs to */<br>
AST_RWLIST_ENTRY(ast_custom_function) acflist;<br>
};<br>
<br>
Can somebody explain me, how can I change my code to the new style.
I tried it, but
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span id="result_box" class="short_text" lang="en"><span class="hps">neither</span>
<span class="hps">one solution worked.<br>
Maybe for a senior developer, it's a simple question. <br>
<br>
Best Regards,<br>
Tamas Szasz<br>
</span></span>
</body>
</html>