#include <glib.h>
#include <string.h>
#include <sound_manager.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[WAV_PLAYER]"
static char* TESTFILE = NULL;
static const char* TESTFILENAME = "sound_5.wav";
{
}
-static bool wav_player_storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
-{
- int str_size = 0;
- if(type == STORAGE_TYPE_INTERNAL) {
- str_size = strlen(path) + strlen(TESTFILENAME) + 6;
- TESTFILE = (char*)malloc(str_size);
- snprintf(TESTFILE, str_size, "%s/res/%s", path, TESTFILENAME);
- return false;
- }
-
- return true;
-}
-
/**
* @function utc_wav_player_startup
* @description Called before each test
*/
void utc_wav_player_startup(void)
{
- if(storage_foreach_device_supported(wav_player_storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) {
- fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+ char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+ if ( true == GetValueForTCTSetting("DEVICE_STORAGE_30", pszValue, API_NAMESPACE ))
+ {
+ PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_STORAGEE_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue);
+ unsigned int size_of_path = strlen(pszValue) + strlen(TESTFILENAME) + 6;
+ TESTFILE = (char*)malloc(size_of_path);
+ snprintf(TESTFILE, size_of_path, "%s/res/%s", pszValue, TESTFILENAME);
}
- if(TESTFILE == NULL) {
- fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+ else
+ {
+ PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
}
}
{
if(TESTFILE != NULL) {
free(TESTFILE);
+ TESTFILE = NULL;
}
}