1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * $Id: mysql.h,v 1.9 2005/03/05 21:39:44 nedko Exp $
7 * MySQL backend header.
10 * Nedko Arnaudov <nedko@users.sourceforge.net>
13 * GNU GENERAL PUBLIC LICENSE version 2
15 *****************************************************************************/
17 #ifndef MYSQL_H__13CFC3E2_C74B_435B_B843_6547D43FEB52__INCLUDED
18 #define MYSQL_H__13CFC3E2_C74B_435B_B843_6547D43FEB52__INCLUDED
20 #include <mysql/mysql.h>
25 char *pszSQLQueryBuffer
;
26 size_t sizeSQLQueryBuffer
;
27 char *pErrorMsgBuffer
;
28 size_t sizeErrorMsgBuffer
;
40 mediadb_mysql_media_add_new(
43 const char *pszComment
,
44 mediadb_mediatype nType
,
45 mediadb_uint
*pnNewMediaID
);
48 mediadb_mysql_media_update_properties(
50 mediadb_uint nMediaID
,
51 mediadb_uint nTimeAdded
,
52 mediadb_uint nTotalFiles
,
53 mediadb_uint nTotalSize
);
56 mediadb_mysql_file_add_new(
58 mediadb_uint nMediaID
,
59 mediadb_filetype Filetype
,
62 mediadb_uint nFileSize
,
63 mediadb_uint nFileTime
);
66 mediadb_mysql_media_get_properties(
68 mediadb_uint nMediaID
,
69 mediadb_uint
*pnTimeAdded
,
70 mediadb_mediatype
*pnType
,
71 mediadb_uint
*pnLocationID
,
75 mediadb_mysql_location_get_properties(
77 mediadb_uint nLocationID
,
78 mediadb_uint
*pnLocationTypeID
,
79 char **ppszDescription
);
82 mediadb_mysql_location_type_get_properties(
84 mediadb_uint nLocationTypeID
,
85 char **ppszDescription
);
88 mediadb_mysql_media_get_properties_data(
90 mediadb_uint nMediaID
,
91 mediadb_uint
*pnTotalFiles
,
92 mediadb_uint
*pnTotalSize
);
95 mediadb_mysql_delete_media_files(
97 mediadb_uint nMediaID
);
100 mediadb_mysql_media_update_name(
102 mediadb_uint nMediaID
,
103 const char *pszName
);
110 mediadb_mysql_get_error_message(
114 mediadb_mysql_media_get_all(
116 mediadb_media_callback pCallback
,
120 mediadb_mysql_files_get(
122 mediadb_uint nMediaID
,
124 mediadb_files_callback pCallback
,
128 mediadb_mysql_get_pattern_match_methods(
130 const struct mediadb_pattern_match_method
**ppPMM
);
133 mediadb_mysql_files_search(
135 mediadb_uint nFilenamePMMID
,
136 const char *pszFilenamePattern
,
137 mediadb_uint nPathPMMID
,
138 const char *pszPathPattern
,
139 const mediadb_uint
*pnMinSize
,
140 const mediadb_uint
*pnMaxSize
,
141 mediadb_files_search_callback pCallback
,
145 mediadb_mysql_file_get_properties(
147 mediadb_uint nMediaID
,
150 mediadb_filetype
*pFiletype
,
151 mediadb_uint
*pnSize
,
152 mediadb_uint
*pnTime
);
154 #endif /* #ifndef MYSQL_H__13CFC3E2_C74B_435B_B843_6547D43FEB52__INCLUDED */
156 /*****************************************************************************
160 * !!! WARNING !!! Following lines are automatically updated by the CVS system.
163 * Revision 1.9 2005/03/05 21:39:44 nedko
164 * new functionality - file_get_properties()
166 * Revision 1.8 2004/08/31 22:40:15 nedko
167 * Partitally implemented search feature.
169 * Revision 1.7 2004/08/08 00:47:42 nedko
170 * Get more info for media from database.
172 * Revision 1.6 2004/05/21 23:40:46 nedko
173 * New functionality: mediadb_files_get()
175 * Revision 1.5 2004/05/16 18:57:12 nedko
176 * media_get_all functionality implemented.
178 * Revision 1.4 2004/05/03 20:47:15 nedko
179 * Update mode for cui
181 * Revision 1.3 2004/05/02 20:12:11 nedko
182 * Improve error dumps.
184 * Revision 1.2 2004/05/02 13:16:58 nedko
185 * Supply filetype when adding new file
187 * Revision 1.1 2004/04/27 09:12:28 nedko
190 *****************************************************************************/