Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

transaction.h File Reference

Transaction functions. More...

#include <packman.h>
#include <packman.h>

Go to the source code of this file.

Data Structures

struct  PmTransaction
 A transaction. More...


Enumerations

enum  PmTransactionType { PM_TRANSACTION_INSTALL, PM_TRANSACTION_UNINSTALL, PM_TRANSACTION_DB_ADD, PM_TRANSACTION_DB_REMOVE }
 Types of transactions. More...


Functions

PmTransactionpmNewTransaction (PmDatabase *db, PmTransactionType type)
 Builds a transaction structure.

void pmDestroyTransaction (PmTransaction *transaction)
 Destroys a PmTransaction structure.

PmStatus pmPerformTransaction (PmTransaction *transaction, PmTransactionError **error)
 Performs a transaction.


Detailed Description

Transaction functions.

Id:
transaction.h,v 1.5 2002/06/07 08:21:48 chipx86 Exp
Copyright:
(C) 1999-2002 The GNUpdate Project.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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.


Enumeration Type Documentation

enum PmTransactionType
 

Types of transactions.

Enumeration values:
PM_TRANSACTION_INSTALL  Installing a package.
PM_TRANSACTION_UNINSTALL  Uninstalling a package.
PM_TRANSACTION_DB_ADD  Adding a package to a database.
PM_TRANSACTION_DB_REMOVE  Removing a package from a database.


Function Documentation

void pmDestroyTransaction PmTransaction   transaction
 

Destroys a PmTransaction structure.

Parameters:
transaction  The transaction to destroy.
See also:
pmNewTransaction()

PmTransaction* pmNewTransaction PmDatabase   db,
PmTransactionType    type
 

Builds a transaction structure.

Parameters:
db  The database to work with.
type  The type of transaction.
Returns:
A PmTransaction structure.
See also:
pmDestroyTransaction()

PmStatus pmPerformTransaction PmTransaction   transaction,
PmTransactionError **    error
 

Performs a transaction.

Parameters:
transaction  The transaction to perform.
error  The resulting errors, or NULL.
Returns:
The status of the transaction.


Generated on Tue Jul 2 03:15:24 2002 for libpackman by doxygen1.2.15-20020430