Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

cxx_logc.cpp

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1997-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: cxx_logc.cpp,v 12.1 2005/06/16 20:21:00 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #include <errno.h>
00013 #include <string.h>
00014 
00015 #include "db_cxx.h"
00016 #include "dbinc/cxx_int.h"
00017 
00018 #include "db_int.h"
00019 #include "dbinc/db_page.h"
00020 #include "dbinc_auto/db_auto.h"
00021 #include "dbinc_auto/crdel_auto.h"
00022 #include "dbinc/db_dispatch.h"
00023 #include "dbinc_auto/db_ext.h"
00024 #include "dbinc_auto/common_ext.h"
00025 
00026 // It's private, and should never be called,
00027 // but some compilers need it resolved
00028 //
00029 DbLogc::~DbLogc()
00030 {
00031 }
00032 
00033 // The name _flags prevents a name clash with __db_log_cursor::flags
00034 int DbLogc::close(u_int32_t _flags)
00035 {
00036         DB_LOGC *logc = this;
00037         int ret;
00038         DbEnv *dbenv2 = DbEnv::get_DbEnv(logc->dbenv);
00039 
00040         ret = logc->close(logc, _flags);
00041 
00042         if (!DB_RETOK_STD(ret))
00043                 DB_ERROR(dbenv2, "DbLogc::close", ret, ON_ERROR_UNKNOWN);
00044 
00045         return (ret);
00046 }
00047 
00048 // The name _flags prevents a name clash with __db_log_cursor::flags
00049 int DbLogc::get(DbLsn *lsn, Dbt *data, u_int32_t _flags)
00050 {
00051         DB_LOGC *logc = this;
00052         int ret;
00053 
00054         ret = logc->get(logc, lsn, data, _flags);
00055 
00056         if (!DB_RETOK_LGGET(ret)) {
00057                 if (ret == DB_BUFFER_SMALL)
00058                         DB_ERROR_DBT(DbEnv::get_DbEnv(logc->dbenv),
00059                                 "DbLogc::get", data, ON_ERROR_UNKNOWN);
00060                 else
00061                         DB_ERROR(DbEnv::get_DbEnv(logc->dbenv),
00062                                 "DbLogc::get", ret, ON_ERROR_UNKNOWN);
00063         }
00064 
00065         return (ret);
00066 }

Generated on Sun Dec 25 12:14:18 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2