SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC ")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Werror")
IF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DTARGET")
CLEAN_DIRECT_OUTPUT 1
)
-INSTALL(TARGETS ${fw_name} DESTINATION lib)
+INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
INSTALL(
DIRECTORY ${INC_DIR}/ DESTINATION include/appfw
FILES_MATCHING
${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
@ONLY
)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
IF(UNIX)
-#sbs-git:slp/api/application capi-appfw-application 0.1.0 56d9b8e057f022f0e7fdb1853587158452e7ae1b
Name: capi-appfw-application
Summary: An Application library in SLP C API
Version: 0.1.0
-Release: 49
-Group: TO_BE/FILLED_IN
-License: TO BE FILLED IN
+Release: 50
+Group: API
+License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(sqlite3)
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
%description
An Application library in SLP C API
%package devel
Summary: An Application library in SLP C API (Development)
-Group: TO_BE/FILLED_IN
+Group: API
Requires: %{name} = %{version}-%{release}
%description devel
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
make %{?jobs:-j%jobs}
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
}
storage_id++;
-
+
foreach_next = callback(storage_info->id, storage_info->device->type, storage_info->state, storage_info->device->path, user_data);
if (foreach_next == false)
*path = strdup(storage_info->device->path);
- return STORAGE_ERROR_NONE;
+ return STORAGE_ERROR_NONE;
}
LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage);
return STORAGE_ERROR_NOT_SUPPORTED;
}
-
+
storage_info->state = get_state();
*state = storage_info->state;
storage_info->state_cb = callback;
storage_info->state_cb_data = user_data;
-
+
set_state_cb = storage_info->device->set_state_cb;
if (set_state_cb == NULL)
LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage);
return STORAGE_ERROR_NOT_SUPPORTED;
}
-
+
if (get_space(bytes, NULL) != 0)
{
LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage);
LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage);
return STORAGE_ERROR_NOT_SUPPORTED;
}
-
+
if (get_space(NULL, bytes) != 0)
{
LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage);
if (total != NULL)
{
- *total = fs.f_bsize * fs.f_blocks;
+ *total = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_blocks;
}
if (available != NULL)
{
- *available = fs.f_bsize * fs.f_bavail;
+ *available = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_bavail;
}
return 0;
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
#define LOG_TAG "CAPI_APPFW_APPLICATION_STORAGE"
-#define INTERNAL_MEMORY_PATH "/opt/media"
+#define INTERNAL_MEMORY_PATH "/opt/usr/media"
static int storage_internal_get_state()
{