return result;
}
-const char* tzplatform_mkpath3(enum tzplatform_variable id, const char * path, const char* path2)
+const char* tzplatform_mkpath3(enum tzplatform_variable id, const char * path,
+ const char* path2)
{
const char *array[4];
const char *result = get_lock( id);
return result;
}
+const char* tzplatform_mkpath4(enum tzplatform_variable id, const char * path,
+ const char* path2, const char *path3)
+{
+ const char *array[5];
+ const char *result = get_lock( id);
+ if (result != NULL) {
+ array[0] = result;
+ array[1] = path;
+ array[2] = path2;
+ array[3] = path3;
+ array[4] = NULL;
+ result = scratchcat( 1, array);
+ }
+ unlock();
+ return result;
+}
+
uid_t tzplatform_getuid(enum tzplatform_variable id)
{
uid_t result = (uid_t)-1;
tizen plaform variable 'id' and the given string 'str'.
The returned value is a scratch buffer (unique for the thread) that is
- available until the next call to 'tzplatform_mkstr', 'tzplatform_mkpath', or,
- 'tzplatform_mkpath3'.
+ available until the next call to 'tzplatform_mkstr', 'tzplatform_mkpath',
+ 'tzplatform_mkpath3' or 'tzplatform_mkpath4'.
Can return NULL in case of internal error.
will return "/opt/home-yes"
*/
extern
-const char* tzplatform_mkstr(enum tzplatform_variable id, const char * str);
+const char* tzplatform_mkstr(enum tzplatform_variable id, const char *str);
/*
Return the string resulting of the path-concatenation of string value of the
path-concatenation is the concatenation taking care of / characters.
The returned value is a scratch buffer (unique for the thread) that is
- available until the next call to 'tzplatform_mkstr', 'tzplatform_mkpath', or,
- 'tzplatform_mkpath3'.
+ available until the next call to 'tzplatform_mkstr', 'tzplatform_mkpath',
+ 'tzplatform_mkpath3' or 'tzplatform_mkpath4'.
Can return NULL in case of internal error.
will return "/opt/home/yes"
*/
extern
-const char* tzplatform_mkpath(enum tzplatform_variable id, const char * path);
+const char* tzplatform_mkpath(enum tzplatform_variable id, const char *path);
/*
Return the string resulting of the path-concatenation of string value of the
path-concatenation is the concatenation taking care of / characters.
The returned value is a scratch buffer (unique for the thread) that is
- available until the next call to 'tzplatform_mkstr', 'tzplatform_mkpath', or,
- 'tzplatform_mkpath3'.
+ available until the next call to 'tzplatform_mkstr', 'tzplatform_mkpath',
+ 'tzplatform_mkpath3' or 'tzplatform_mkpath4'.
Can return NULL in case of internal error.
will return "/opt/home/yes/no"
*/
extern
-const char* tzplatform_mkpath3(enum tzplatform_variable id, const char * path,
- const char* path2);
+const char* tzplatform_mkpath3(enum tzplatform_variable id, const char *path,
+ const char *path2);
+
+/*
+ Return the string resulting of the path-concatenation of string value of the
+ tizen plaform variable 'id' and the given strings 'path', 'path2' and 'path3'.
+
+ path-concatenation is the concatenation taking care of / characters.
+
+ The returned value is a scratch buffer (unique for the thread) that is
+ available until the next call to 'tzplatform_mkstr', 'tzplatform_mkpath',
+ 'tzplatform_mkpath3' or 'tzplatform_mkpath4'.
+
+ Can return NULL in case of internal error.
+
+ Example:
+ if TZ_SYS_HOME == "/opt/home" then calling
+
+ tzplatform_mkpath4(TZ_SYS_HOME,"yes","no","/maybe")
+
+ will return "/opt/home/yes/no/maybe"
+*/
+extern
+const char* tzplatform_mkpath4(enum tzplatform_variable id, const char *path,
+ const char *path2, const char *path3);
/*
Return the uid for a given user name, stored in variable <id>