[svn-commits] qwell: branch group/ast_storage r66874 - in /team/group/ast_storage: include/...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jun 1 09:16:48 MST 2007


Author: qwell
Date: Fri Jun  1 11:16:48 2007
New Revision: 66874

URL: http://svn.digium.com/view/asterisk?view=rev&rev=66874
Log:
Let's try not to anger the C++ Gods by using reserved keywords. ;)

Modified:
    team/group/ast_storage/include/asterisk/storage.h
    team/group/ast_storage/main/storage.c
    team/group/ast_storage/res/res_storage_file.c
    team/group/ast_storage/res/res_storage_odbc.c

Modified: team/group/ast_storage/include/asterisk/storage.h
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/include/asterisk/storage.h?view=diff&rev=66874&r1=66873&r2=66874
==============================================================================
--- team/group/ast_storage/include/asterisk/storage.h (original)
+++ team/group/ast_storage/include/asterisk/storage.h Fri Jun  1 11:16:48 2007
@@ -35,11 +35,11 @@
 
 struct ast_storage_be {
 	const char *name;
-	struct ast_storage *(*new)(const char *uri);
+	struct ast_storage *(*create)(const char *uri);
 	int (*free)(struct ast_storage *st);
 	int (*get)(struct ast_storage *st, const char *objectname, const char *fileformats, char *localfile, size_t localfilesize);
 	int (*put)(struct ast_storage *st, const char *objectname, const char *fileformats, const char *localfile);
-	int (*delete)(struct ast_storage *st, const char *objectname, const char *fileformats);
+	int (*del)(struct ast_storage *st, const char *objectname, const char *fileformats);
 	void *(*opendir)(struct ast_storage *st, const char *objectpath);
 	int (*readdir)(struct ast_storage *st, void *dirptr, struct ast_storage_dirent *dirent);
 	int (*closedir)(struct ast_storage *st, void *dirptr);
@@ -97,7 +97,7 @@
  * \param objectname Logical name of the file
  * \param fileformats Formats to delete
  */
-int ast_storage_delete(struct ast_storage *st, const char *objectname, const char *fileformats);
+int ast_storage_del(struct ast_storage *st, const char *objectname, const char *fileformats);
 
 /*! \brief Starts retrieval of objects in a resource path
  * \param st Storage instance

Modified: team/group/ast_storage/main/storage.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/main/storage.c?view=diff&rev=66874&r1=66873&r2=66874
==============================================================================
--- team/group/ast_storage/main/storage.c (original)
+++ team/group/ast_storage/main/storage.c Fri Jun  1 11:16:48 2007
@@ -101,7 +101,7 @@
 
 	AST_RWLIST_TRAVERSE(&storage_engines, e, list) {
 		if (!strcasecmp(e->name, storage_type))
-			return e->new(uri);
+			return e->create(uri);
 	}
 	return NULL;
 }
@@ -121,9 +121,9 @@
 	return st->be->put ? st->be->put(st, objectname, fileformats, localfile) : -1;
 }
 
-int ast_storage_delete(struct ast_storage *st, const char *objectname, const char *fileformats)
-{
-	return st->be->delete ? st->be->delete(st, objectname, fileformats) : -1;
+int ast_storage_del(struct ast_storage *st, const char *objectname, const char *fileformats)
+{
+	return st->be->del ? st->be->del(st, objectname, fileformats) : -1;
 }
 
 void *ast_storage_opendir(struct ast_storage *st, const char *objectpath)
@@ -213,7 +213,7 @@
 		ast_cli(fd, "Storage Engine: %s\n", e->name);
 		ast_cli(fd, "Can get       : %s\n", e->get ? "yes" : "no");
 		ast_cli(fd, "Can put       : %s\n", e->put ? "yes" : "no");
-		ast_cli(fd, "Can delete    : %s\n", e->delete ? "yes" : "no");
+		ast_cli(fd, "Can del       : %s\n", e->del ? "yes" : "no");
 		ast_cli(fd, "Can opendir   : %s\n", e->opendir ? "yes" : "no");
 		ast_cli(fd, "Can readdir   : %s\n", e->readdir ? "yes" : "no");
 		ast_cli(fd, "Can closedir  : %s\n", e->closedir ? "yes" : "no");

Modified: team/group/ast_storage/res/res_storage_file.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/res/res_storage_file.c?view=diff&rev=66874&r1=66873&r2=66874
==============================================================================
--- team/group/ast_storage/res/res_storage_file.c (original)
+++ team/group/ast_storage/res/res_storage_file.c Fri Jun  1 11:16:48 2007
@@ -48,7 +48,7 @@
 
 static const struct ast_storage_be file_se;
 
-static struct ast_storage *se_new_file(const char *uri)
+static struct ast_storage *se_create_file(const char *uri)
 {
 	struct ast_storage_file *fst = ast_calloc(1, sizeof(struct ast_storage_file));
 	ast_copy_string(fst->rootpath, uri + 6, sizeof(fst->rootpath));
@@ -138,7 +138,7 @@
 	return res;
 }
 
-static int se_delete_file(struct ast_storage *st, const char *objectname, const char *fileformats)
+static int se_del_file(struct ast_storage *st, const char *objectname, const char *fileformats)
 {
 	struct ast_storage_file *fst = (struct ast_storage_file *)st;
 	char dest[256];
@@ -203,11 +203,11 @@
 
 static const struct ast_storage_be file_se = {
 	.name = "file",
-	.new = se_new_file,
+	.create = se_create_file,
 	.free = se_free_file,
 	.get = se_get_file,
 	.put = se_put_file,
-	.delete = se_delete_file,
+	.del = se_del_file,
 	.opendir = se_opendir_file,
 	.readdir = se_readdir_file,
 	.closedir = se_closedir_file,

Modified: team/group/ast_storage/res/res_storage_odbc.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/res/res_storage_odbc.c?view=diff&rev=66874&r1=66873&r2=66874
==============================================================================
--- team/group/ast_storage/res/res_storage_odbc.c (original)
+++ team/group/ast_storage/res/res_storage_odbc.c Fri Jun  1 11:16:48 2007
@@ -121,7 +121,7 @@
 	return 0;
 }
 
-static struct ast_storage *se_new_odbc(const char *uri)
+static struct ast_storage *se_create_odbc(const char *uri)
 {
 	char tmp[256], columnname[80];
 	int res;
@@ -527,7 +527,7 @@
 	return res ? -1 : 0;
 }
 
-static int se_delete_odbc(struct ast_storage *st, const char *objectname, const char *fileformats)
+static int se_del_odbc(struct ast_storage *st, const char *objectname, const char *fileformats)
 {
 	char pathname[256], filename[256], sql[256];
 	struct ast_storage_odbc *ost = (struct ast_storage_odbc *)st;
@@ -589,11 +589,11 @@
 
 static const struct ast_storage_be odbc_se = {
 	.name = "odbc",
-	.new = se_new_odbc,
+	.create = se_create_odbc,
 	.free = se_free_odbc,
 	.get = se_get_odbc,
 	.put = se_put_odbc,
-	.delete = se_delete_odbc,
+	.del = se_del_odbc,
 	.opendir = se_opendir_odbc,
 	.readdir = se_readdir_odbc,
 	.closedir = se_closedir_odbc,



More information about the svn-commits mailing list