Mercurial > hg > audiodb
diff audioDB.cpp @ 393:fd9b65e5ca95 api-inversion
There can be only one (again).
I think I see how it arose, but there's in fact no need to have two
separate status structures ("struct adbstatus" and "struct cppstatus").
Delete "struct cppstatus" and simplify audioDB::status accordingly.
author | mas01cr |
---|---|
date | Tue, 25 Nov 2008 16:40:59 +0000 |
parents | 78fed0d4c108 |
children | bc7a821004bb |
line wrap: on
line diff
--- a/audioDB.cpp Mon Nov 24 15:42:15 2008 +0000 +++ b/audioDB.cpp Tue Nov 25 16:40:59 2008 +0000 @@ -231,7 +231,7 @@ } //for API status -audioDB::audioDB(const unsigned argc, const char *argv[], cppstatusptr stat, int * apierror): O2_AUDIODB_INITIALIZERS +audioDB::audioDB(const unsigned argc, const char *argv[], adb_status_t *stat, int * apierror): O2_AUDIODB_INITIALIZERS { try { @@ -791,7 +791,7 @@ } ///used by lib/API -void audioDB::status(const char* dbName, cppstatusptr status){ +void audioDB::status(const char* dbName, adb_status_t *status){ if(!dbH) { initTables(dbName, 0); } @@ -1193,8 +1193,6 @@ ///* status command */ int audiodb_status(adb_ptr mydb, adb_status_ptr status){ - - cppstatus sss; int apierror=0; const char *argv[5]; @@ -1206,15 +1204,8 @@ argv[3]=mydb->path; argv[4]='\0'; - audioDB::audioDB(4,argv,&sss ,&apierror); + audioDB::audioDB(4,argv,status ,&apierror); - status->numFiles=sss.numFiles; - status->dim=sss.dim; - status->length=sss.length; - status->dudCount=sss.dudCount; - status->nullCount=sss.nullCount; - status->flags=sss.flags; - return apierror; }