|
Packit Service |
310c69 |
/*
|
|
Packit Service |
310c69 |
* Copyright (c) 2020 Red Hat, Inc.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is free software; you can redistribute it and/or
|
|
Packit Service |
310c69 |
* modify it under the terms of the GNU General Public License
|
|
Packit Service |
310c69 |
* as published by the Free Software Foundation; either version 2
|
|
Packit Service |
310c69 |
* of the License, or (at your option) any later version.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is distributed in the hope that it will be useful,
|
|
Packit Service |
310c69 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
310c69 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
310c69 |
* GNU General Public License for more details.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* You should have received a copy of the GNU General Public License
|
|
Packit Service |
310c69 |
* along with this program; if not, write to the Free Software
|
|
Packit Service |
310c69 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
310c69 |
* 02110-1301, USA.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* $Id: //eng/uds-releases/jasper/src/uds/recordPage.h#2 $
|
|
Packit Service |
310c69 |
*/
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#ifndef RECORDPAGE_H
|
|
Packit Service |
310c69 |
#define RECORDPAGE_H 1
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#include "common.h"
|
|
Packit Service |
310c69 |
#include "volume.h"
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Generate the on-disk encoding of a record page from the list of records
|
|
Packit Service |
310c69 |
* in the open chapter representation.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param volume The volume
|
|
Packit Service |
310c69 |
* @param records The records to be encoded
|
|
Packit Service |
310c69 |
* @param recordPage The record page
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @return UDS_SUCCESS or an error code
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
int encodeRecordPage(const Volume *volume,
|
|
Packit Service |
310c69 |
const UdsChunkRecord records[],
|
|
Packit Service |
310c69 |
byte recordPage[]);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Find the metadata for a given block name in this page.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param recordPage The record page
|
|
Packit Service |
310c69 |
* @param name The block name to look for
|
|
Packit Service |
310c69 |
* @param geometry The geometry of the volume
|
|
Packit Service |
310c69 |
* @param metadata an array in which to place the metadata of the
|
|
Packit Service |
310c69 |
* record, if one was found
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @return true if the record was found
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
bool searchRecordPage(const byte recordPage[],
|
|
Packit Service |
310c69 |
const UdsChunkName *name,
|
|
Packit Service |
310c69 |
const Geometry *geometry,
|
|
Packit Service |
310c69 |
UdsChunkData *metadata);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#endif /* RECORDPAGE_H */
|