00001 /* 00002 * Copyright (c) 2009 Thierry FOURNIER 00003 * 00004 * This file is part of MySAC. 00005 * 00006 * MySAC is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License 00009 * 00010 * MySAC is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public License 00016 * along with MySAC. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 /** @file */ 00020 00021 #ifndef __MYSAC_DECODE_ROW_H__ 00022 #define __MYSAC_DECODE_ROW_H__ 00023 00024 #include "mysac.h" 00025 00026 /** 00027 * This decode mysql row binary format packet 00028 * 00029 * @param buf is the buffer containing packet the strings stored into col, are 00030 * allocated into this buffer 00031 * @param len is the length of the packet 00032 * @param res is valid MYSAC_RES 00033 * @param row is valid col struct space for storing pointers and values 00034 * 00035 * @return the len of the buffer used for storing data or 00036 * -1 if the packet is corrupted 00037 */ 00038 int mysac_decode_binary_row(char *buf, int len, MYSAC_RES *res, MYSAC_ROWS *row); 00039 00040 /** 00041 * This decode mysql row string format packet 00042 * 00043 * @param buf is the buffer containing packet the strings stored into col, are 00044 * allocated into this buffer 00045 * @param len is the length of the packet 00046 * @param res is valid MYSAC_RES 00047 * @param row is valid col struct space for storing pointers and values 00048 * 00049 * @return the len of the buffer used for storing data or 00050 * -1 if the packet is corrupted 00051 */ 00052 int mysac_decode_string_row(char *buf, int len, MYSAC_RES *res, MYSAC_ROWS *row); 00053 00054 #endif