#include <libpackman/package.h>
#include <libpackman/db.h>
#include <libpackman/script.h>
Go to the source code of this file.
Data Structures | |
struct | _PmDatabaseOps |
Database operations structure. More... | |
struct | _PmModule |
A package or database module. More... | |
struct | _PmPackageOps |
Package operations structure. More... | |
Defines | |
#define | PM_INIT_DB_MODULE(modname, initfunc, dbops) |
Handles the initialization of modules. | |
#define | PM_INIT_PKG_MODULE(modname, initfunc, pkgops) |
Typedefs | |
typedef enum _PmModuleType | PmModuleType |
Module types. | |
typedef _PmDatabaseOps | PmDatabaseOps |
Database operations. | |
typedef _PmPackageOps | PmPackageOps |
Package operations. | |
typedef _PmModule | PmModule |
A loadable module. | |
Enumerations | |
enum | _PmModuleType { PM_MODULE_PACKAGE, PM_MODULE_DATABASE } |
A module type. More... | |
Functions | |
PmModule * | pmRegisterModule (const char *name, void *ops, PmModuleType type) |
Registers a module. | |
PmModule * | pmLoadModule (const char *name, PmModuleType type) |
Loads the module of the specified name and type. | |
void | pmUnloadModule (PmModule *module) |
Unloads the specified module. | |
PmModule * | pmGetModule (const char *name, PmModuleType type) |
Returns the specified module. | |
void | pmLinkModule (PmModule **ptr) |
Notifies libpackman that the module is being used. | |
void | pmUnlinkModule (PmModule **ptr) |
Notifies libpackman that the module is no longer being used. | |
PmModule * | pmGetFirstModule (PmModuleType type) |
Returns the first module in the list. | |
void | pmCleanupModules (void) |
Unloads all modules. | |
void | pmCleanup (void) |
Cleans up the entire library. |
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Value: PmModule *initPackmanModule(void) { \ initfunc(PM_MODULE_DATABASE); \ return pmRegisterModule(#modname, &(dbops), PM_MODULE_DATABASE); \ }
|
|
Value: PmModule *initPackmanModule(void) { \ initfunc(PM_MODULE_PACKAGE); \ return pmRegisterModule(#modname, &(pkgops), PM_MODULE_PACKAGE); \ } |
|
Database operations.
|
|
A loadable module.
|
|
Module types.
|
|
Package operations.
|
|
A module type. These are the types of modules that libpackman can dynamically load. |
|
Cleans up the entire library. This should only be called when you are absolutely done with this library. This will call pmCleanupModules() automatically.
|
|
Unloads all modules. This should only be called when you are absolutely done with this library. This will be automatically called by pmCleanup().
|
|
Returns the first module in the list. This will probably only be useful inside libpackman.
|
|
Returns the specified module. The module will be automatically loaded if it's not already loaded.
|
|
Notifies libpackman that the module is being used. This is used to increment the module's reference count.
|
|
Loads the module of the specified name and type.
|
|
Registers a module.
|
|
Notifies libpackman that the module is no longer being used. This is used to decrement the module's reference count.
|
|
Unloads the specified module.
|