Blame source/uds/masterIndex006.h

Packit b55c50
/*
Packit b55c50
 * Copyright (c) 2020 Red Hat, Inc.
Packit b55c50
 *
Packit b55c50
 * This program is free software; you can redistribute it and/or
Packit b55c50
 * modify it under the terms of the GNU General Public License
Packit b55c50
 * as published by the Free Software Foundation; either version 2
Packit b55c50
 * of the License, or (at your option) any later version.
Packit b55c50
 * 
Packit b55c50
 * This program is distributed in the hope that it will be useful,
Packit b55c50
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit b55c50
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit b55c50
 * GNU General Public License for more details.
Packit b55c50
 * 
Packit b55c50
 * You should have received a copy of the GNU General Public License
Packit b55c50
 * along with this program; if not, write to the Free Software
Packit b55c50
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit b55c50
 * 02110-1301, USA. 
Packit b55c50
 *
Packit b55c50
 * $Id: //eng/uds-releases/jasper/src/uds/masterIndex006.h#1 $
Packit b55c50
 */
Packit b55c50
Packit b55c50
#ifndef MASTERINDEX006_H
Packit b55c50
#define MASTERINDEX006_H 1
Packit b55c50
Packit b55c50
#include "masterIndexOps.h"
Packit b55c50
Packit b55c50
/**
Packit b55c50
 * Make a new master index.
Packit b55c50
 *
Packit b55c50
 * @param config          The configuration of the master index
Packit b55c50
 * @param numZones        The number of zones
Packit b55c50
 * @param volumeNonce     The nonce used to authenticate the index
Packit b55c50
 * @param masterIndex     Location to hold new master index ptr
Packit b55c50
 *
Packit b55c50
 * @return error code or UDS_SUCCESS
Packit b55c50
 **/
Packit b55c50
int makeMasterIndex006(const Configuration *config, unsigned int numZones,
Packit b55c50
                       uint64_t volumeNonce, MasterIndex **masterIndex)
Packit b55c50
  __attribute__((warn_unused_result));
Packit b55c50
Packit b55c50
/**
Packit b55c50
 * Compute the number of bytes required to save a master index of a given
Packit b55c50
 * configuration.
Packit b55c50
 *
Packit b55c50
 * @param config    The configuration of the master index
Packit b55c50
 * @param numBytes  The number of bytes required to save the master index
Packit b55c50
 *
Packit b55c50
 * @return UDS_SUCCESS or an error code.
Packit b55c50
 **/
Packit b55c50
int computeMasterIndexSaveBytes006(const Configuration *config,
Packit b55c50
                                   size_t *numBytes)
Packit b55c50
  __attribute__((warn_unused_result));
Packit b55c50
Packit b55c50
#endif /* MASTERINDEX006_H */