Let's also include aclocal.m4
[asterisk-bristuff.git] / doc / modules.txt
blob4f6d4c67b23d004bdbba736e6a39d06b491f5bb9
1 All modules must have at least the following functions:
3 int load_module():
5         Do what you need to do when you get started.  This function
6 returns 0 on success and non-zero on failure (it is not considered loaded
7 if it fails.
9 int unload_module():
10         
11         The module will soon be unloaded.  If any channels are using your
12 features, you should give them a softhangup in an effort to keep the
13 program from crashing.  Generally, unload_module is only called when the
14 usecount is 0 or less, but the user can force unloading at their
15 discretion, and thus a module should do its best to comply (although in
16 some cases there may be no way to avoid a crash).  This function should
17 return 0 on success and non-zero on failure (i.e. it cannot yet be
18 unloaded).
20 char *description():
22         Return a description of the module's functionality.
24 int usecnt():
25         
26         Return the number of channels, etc that are using you.