1
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
3
* PrimeBase Media Stream for MySQL
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
* Original author: Paul McCullagh
20
* Continued development: Barry Leslie
36
#define MS_URL_TYPE_BLOB '~'
37
#define MS_URL_TYPE_REPO '_'
40
typedef struct MSBlobURL {
43
uint32_t bu_tab_id; // or repo ID if type = REPO
44
uint64_t bu_blob_id; // or repo file offset if type = REPO
45
uint32_t bu_auth_code;
46
uint32_t bu_server_id;
47
uint64_t bu_blob_size;
48
uint64_t bu_blob_ref_id; // Unique identifier of the blob reference
49
} MSBlobURLRec, *MSBlobURLPtr;
51
uint32_t ms_file_to_table_id(const char *file_name, const char *name_part);
52
uint32_t ms_file_to_table_id(const char *file_name);
53
const char *ms_file_to_table_name(size_t size, char *tab_name, const char *file_name);
54
bool ms_parse_blob_url(MSBlobURLPtr blob, const char *url);
55
void ms_build_blob_url(MSBlobURLPtr blob, char *url);
56
const char *ms_version();
59
* The pbms_ functions are utility functions supplied by ha_pbms.cc
61
void pbms_take_part_in_transaction(void *thread);
62
int pbms_enter_conn_no_thd(CSThread **r_self, PBMSResultPtr result);
63
void pbms_exit_conn();
64
int pbms_exception_to_result(CSException *e, PBMSResultPtr result);
65
int pbms_os_error_result(const char *func, const char *file, int line, int err, PBMSResultPtr result);
66
int pbms_error_result(const char *func, const char *file, int line, int err, const char *message, PBMSResultPtr result);