~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to libdrizzle/pack.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Drizzle Client & Protocol Library
 
3
 *
 
4
 * Copyright (C) 2008 Eric Day (eday@oddments.org)
 
5
 * All rights reserved.
 
6
 *
 
7
 * Use and distribution licensed under the BSD license.  See
 
8
 * the COPYING.BSD file in the root source directory for full text.
 
9
 */
 
10
 
 
11
/**
 
12
 * @file
 
13
 * @brief Packing Declarations
 
14
 */
 
15
 
 
16
#ifndef __DRIZZLE_PACK_H
 
17
#define __DRIZZLE_PACK_H
 
18
 
 
19
#ifdef __cplusplus
 
20
extern "C" {
 
21
#endif
 
22
 
 
23
/**
 
24
 * @addtogroup drizzle_pack Packing Declarations
 
25
 *
 
26
 * These functions are used internally to pack various parts of the protocol.
 
27
 * Not all functions are defined in pack.c, they are in the most appropriate
 
28
 * source file (for example, handshake.c for drizzle_pack_client_handshake).
 
29
 * @{
 
30
 */
 
31
 
 
32
/**
 
33
 * Pack length-encoded number.
 
34
 */
 
35
DRIZZLE_API
 
36
uint8_t *drizzle_pack_length(uint64_t number, uint8_t *ptr);
 
37
 
 
38
/**
 
39
 * Unpack length-encoded number.
 
40
 */
 
41
DRIZZLE_API
 
42
uint64_t drizzle_unpack_length(drizzle_con_st *con, drizzle_return_t *ret_ptr);
 
43
 
 
44
/**
 
45
 * Pack length-encoded string.
 
46
 */
 
47
DRIZZLE_API
 
48
uint8_t *drizzle_pack_string(char *string, uint8_t *ptr);
 
49
 
 
50
/**
 
51
 * Unpack length-encoded string.
 
52
 */
 
53
DRIZZLE_API
 
54
drizzle_return_t drizzle_unpack_string(drizzle_con_st *con, char *buffer,
 
55
                                       uint64_t max_size);
 
56
 
 
57
/**
 
58
 * Pack user, scramble, and db.
 
59
 */
 
60
DRIZZLE_API
 
61
uint8_t *drizzle_pack_auth(drizzle_con_st *con, uint8_t *ptr,
 
62
                           drizzle_return_t *ret_ptr);
 
63
 
 
64
/** @} */
 
65
 
 
66
#ifdef __cplusplus
 
67
}
 
68
#endif
 
69
 
 
70
#endif /* __DRIZZLE_PACK_H */