source: trunk/src/core/RpEncode.h @ 1264

Last change on this file since 1264 was 1264, checked in by dkearney, 14 years ago

fixing rp library's get() function for retrieving encoded data. if the data is encoded there is no need to do xml entity translation. adding a function rappture's encode class for checking to see if a string has a proper header encode header. adding corresponding tcl functions and tests. also adjusting some of the int declarations to size_t.

File size: 1.1 KB
Line 
1/*
2 * ======================================================================
3 *  Rappture::encoding
4 *
5 *  AUTHOR:  Derrick Kearney, Purdue University
6 *
7 *  Copyright (c) 2004-2007  Purdue Research Foundation
8 * ----------------------------------------------------------------------
9 *  See the file "license.terms" for information on usage and
10 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 * ======================================================================
12 */
13
14#ifndef RAPPTURE_ENCODE_H
15#define RAPPTURE_ENCODE_H
16
17#include <RpBuffer.h>
18#include <RpOutcome.h>
19
20#define RPENC_Z      1
21#define RPENC_B64    2
22#define RPENC_HDR    4
23
24#ifdef __cplusplus
25extern "C" {
26namespace Rappture {
27    namespace encoding {
28#endif // ifdef __cplusplus
29
30int isbinary(const char* buf, int size);
31size_t isencoded(const char* buf, int size);
32Rappture::Outcome encode (Rappture::Buffer& buf, size_t flags);
33Rappture::Outcome decode (Rappture::Buffer& buf, size_t flags);
34
35#ifdef __cplusplus
36    } // namespace encoding
37} // namespace Rappture
38} // extern C
39#endif // ifdef __cplusplus
40
41#endif // RAPPTURE_ENCODE_H
Note: See TracBrowser for help on using the repository browser.