Commit f964ee40 authored by Ignacio Solis's avatar Ignacio Solis

Merge pull request #11 from chris-wood/8-chris-chunker_integration

Boyscout updates and CCNx dependency removal
parents 430a8ad2 34dab194
......@@ -26,7 +26,7 @@
*/
/**
* @author Christopher Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
#include <config.h>
......
......@@ -30,11 +30,11 @@
* @brief A BufferChunker is a chunker that segments a PARCBuffer.
*
* @author Christopher A. Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
#ifndef libccnx_parc_BufferChunker_h
#define libccnx_parc_BufferChunker_h
#ifndef libparc_parc_BufferChunker_h
#define libparc_parc_BufferChunker_h
#include <config.h>
......@@ -48,7 +48,7 @@ struct parc_buffer_chunker;
typedef struct parc_buffer_chunker PARCBufferChunker;
/**
* The mapping of a `PARCArrayList` to the generic `PARCList`.
* The mapping of a `PARCBufferChunker` to the generic `PARCChunker`.
*/
extern PARCChunkerInterface *PARCBufferChunkerAsChunker;
......@@ -58,26 +58,26 @@ extern PARCChunkerInterface *PARCBufferChunkerAsChunker;
* @param [in] data A `PARCBuffer` which contains the data.
* @param [in] chunkSize The size per chunk.
*
* @retval CCNxChunker A newly allocated `CCNxChunker`
* @retval PARCChunker A newly allocated `PARCChunker`
* @retval NULL An error occurred.
*
* Example
* @code
* {
* PARCBuffer *dataToChunk = ...
* CCNxChunker *chunker = ccnxChunker_CreateFromBuffer(dataToChunk, 32);
* PARCChunker *chunker = ccnxChunker_CreateFromBuffer(dataToChunk, 32);
* }
*/
PARCBufferChunker *parcBufferChunker_Create(PARCBuffer *data, size_t chunkSize);
/**
* Increase the number of references to a `CCNxChunker` instance.
* Increase the number of references to a `PARCChunker` instance.
*
* Note that new `CCNxChunker` is not created,
* only that the given `CCNxChunker` reference count is incremented.
* Note that new `PARCChunker` is not created,
* only that the given `PARCChunker` reference count is incremented.
* Discard the reference by invoking {@link ccnxChunker_Release}.
*
* @param [in] chunker A pointer to the original `CCNxChunker`.
* @param [in] chunker A pointer to the original `PARCChunker`.
* @return The value of the input parameter @p chunker.
*
* Example:
......@@ -211,4 +211,4 @@ PARCIterator *parcBufferChunker_ForwardIterator(const PARCBufferChunker *chunker
*/
PARCIterator *parcBufferChunker_ReverseIterator(const PARCBufferChunker *chunker);
#endif // libccnx_parc_BufferChunker_h
#endif // libparc_parc_BufferChunker_h
......@@ -26,7 +26,7 @@
*/
/**
* @author Christopher Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
#include <config.h>
......
......@@ -25,17 +25,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file ccnx_Chunker.h
* @file parc_Chunker.h
* @ingroup ContentObject
* @brief A Chunker is an object that breaks up a large piece of data from a `PARCBuffer`
* or a file and provides an iterator to walk over the chunks in sequential order.
*
* @author Christopher A. Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
#ifndef libccnx_ccnx_Chunker_h
#define libccnx_ccnx_Chunker_h
#ifndef libparc_parc_Chunker_h
#define libparc_parc_Chunker_h
#include <config.h>
......@@ -79,8 +79,8 @@ typedef struct PARCChunkerInterface {
* @code
* {
* PARCBuffer *dataToChunk = ...
* PARCChunkerBuffer *bufferChunker = ccnxBufferChunker_Create(dataToChunk, 32);
* PARCChunker *chunker = parcChunker_Create(bufferCunker, &CCNxBufferChunkerAsChunker);
* PARCChunkerBuffer *bufferChunker = parcBufferChunker_Create(dataToChunk, 32);
* PARCChunker *chunker = parcChunker_Create(bufferCunker, &PARCBufferChunkerAsChunker);
* }
*/
PARCChunker *parcChunker_Create(void *instance, PARCChunkerInterface *interface);
......@@ -210,7 +210,7 @@ bool parcChunker_Equals(const PARCChunker *chunkerA, const PARCChunker *chunkerB
* @code
* {
* PARCBuffer *dataToChunk = ...
* CCNxBufferChunker *chunker = ...
* PARCBufferChunker *chunker = ...
*
* PARCIterator *itr = parcChunker_ForwardIterator(chunker);
*
......@@ -243,4 +243,4 @@ PARCIterator *parcChunker_ForwardIterator(const PARCChunker *chunker);
* @endcode
*/
PARCIterator *parcChunker_ReverseIterator(const PARCChunker *chunker);
#endif // libccnx_ccnx_Chunker_h
#endif // libparc_parc_Chunker_h
......@@ -26,7 +26,7 @@
*/
/**
* @author Christopher Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
#include <config.h>
......
......@@ -30,11 +30,11 @@
* @brief A FileChunker is a chunker that segments the content of a file.
*
* @author Christopher A. Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
#ifndef libccnx_parc_FileChunker_h
#define libccnx_parc_FileChunker_h
#ifndef libparc_parc_FileChunker_h
#define libparc_parc_FileChunker_h
#include <config.h>
......@@ -50,7 +50,7 @@ struct parc_buffer_chunker;
typedef struct parc_buffer_chunker PARCFileChunker;
/**
* The mapping of a `PARCArrayList` to the generic `PARCList`.
* The mapping of a `PARCFileChunker` to the generic `PARCChunker`.
*/
extern PARCChunkerInterface *PARCFileChunkerAsChunker;
......@@ -60,26 +60,26 @@ extern PARCChunkerInterface *PARCFileChunkerAsChunker;
* @param [in] file A `PARCFile` from which the data will be read.
* @param [in] chunkSize The size per chunk.
*
* @retval CCNxChunker A newly allocated `CCNxChunker`
* @retval PARCFileChunker A newly allocated `PARCFileChunker`
* @retval NULL An error occurred.
*
* Example
* @code
* {
* PARCBuffer *dataToChunk = ...
* CCNxChunker *chunker = ccnxChunker_CreateFromBuffer(dataToChunk, 32);
* PARCFileChunker *chunker = PARCFileChunker_CreateFromBuffer(dataToChunk, 32);
* }
*/
PARCFileChunker *parcFileChunker_Create(PARCFile *file, size_t chunkSize);
/**
* Increase the number of references to a `CCNxChunker` instance.
* Increase the number of references to a `PARCFileChunker` instance.
*
* Note that new `CCNxChunker` is not created,
* only that the given `CCNxChunker` reference count is incremented.
* Discard the reference by invoking {@link ccnxChunker_Release}.
* Note that new `PARCFileChunker` is not created,
* only that the given `PARCFileChunker` reference count is incremented.
* Discard the reference by invoking {@link PARCFileChunker_Release}.
*
* @param [in] chunker A pointer to the original `CCNxChunker`.
* @param [in] chunker A pointer to the original `PARCFileChunker`.
* @return The value of the input parameter @p chunker.
*
* Example:
......@@ -212,4 +212,4 @@ PARCIterator *parcFileChunker_ForwardIterator(const PARCFileChunker *chunker);
* @endcode
*/
PARCIterator *parcFileChunker_ReverseIterator(const PARCFileChunker *chunker);
#endif // libccnx_parc_FileChunker_h
#endif // libparc_parc_FileChunker_h
......@@ -26,7 +26,7 @@
*/
/**
* @author Christopher A. Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
// Include the file(s) containing the functions to be tested.
......@@ -35,8 +35,6 @@
#include <stdio.h>
#include <ccnx/common/ccnx_Name.h>
#include <LongBow/unit-test.h>
#include <parc/algol/parc_SafeMemory.h>
......
......@@ -26,7 +26,7 @@
*/
/**
* @author Christopher A. Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
// Include the file(s) containing the functions to be tested.
......@@ -35,8 +35,6 @@
#include <stdio.h>
#include <ccnx/common/ccnx_Name.h>
#include <parc/algol/parc_Object.h>
#include <LongBow/unit-test.h>
......
......@@ -26,15 +26,13 @@
*/
/**
* @author Christopher A. Wood, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2015, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
* @copyright 2015-2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*/
// Include the file(s) containing the functions to be tested.
// This permits internal static functions to be visible to this Test Framework.
#include "../parc_FileChunker.c"
#include <ccnx/common/ccnx_Name.h>
#include <LongBow/unit-test.h>
#include <parc/algol/parc_SafeMemory.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment