Drizzled Public API Documentation

systab_dump_ms.h
00001 /* Copyright (C) 2009 PrimeBase Technologies GmbH, Germany
00002  *
00003  * PrimeBase Media Stream for MySQL
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00018  *
00019  * Barry Leslie
00020  *
00021  * System dump table.
00022  *
00023  */
00024 
00025 #pragma once
00026 #ifndef __SYSTAB_DUMP_H__
00027 #define __SYSTAB_DUMP_H__
00028 
00029 #include "cslib/CSMutex.h"
00030 
00031 #include "defs_ms.h"
00032 #include "system_table_ms.h"
00033 
00034 class MSDumpTable : public MSRepositoryTable {
00035 public:
00036   MSDumpTable(MSSystemTableShare *share, TABLE *table);
00037   ~MSDumpTable();
00038   
00039   void seqScanInit();
00040   bool seqScanNext(char *buf);
00041   void insertRow(char *buf);
00042   void use();
00043   void unuse();
00044   
00045 private:
00046   uint32_t  dt_cloudbackupDBID;
00047   bool dt_hasCompleted;
00048   bool dt_hasInfo;
00049   bool dt_haveCloudInfo;
00050   uint16_t  dt_headerSize;
00051   
00052   virtual bool returnRow(MSBlobHeadPtr blob, char *buf);
00053   bool returnDumpRow(char *record, uint64_t record_size, char *buf);
00054   bool returnInfoRow(char *buf);
00055   
00056   void setUpRepository(const char *repoInfo, uint32_t length);
00057   void insertRepoRow(MSBlobHeadPtr blob, uint32_t length);
00058 };
00059 
00060 extern DT_FIELD_INFO pbms_dump_info[];
00061 extern DT_KEY_INFO pbms_dump_keys[];
00062 
00063 #endif // __SYSTAB_DUMP_H__