/* * sync-agent * Copyright (c) 2012 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. */ #ifndef LUID_H_ #define LUID_H_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @file luid.h * @brief Support to generate unique ID */ /** @addtogroup data_adapter * @{ */ /** * @brief Generate new item LUID to use inside agent, when add new item * @remarks Generated Sequence ID ( 1, 2, 3, .... ) to max ID value described in F/W initiation config file \\ * @par Usage: * @code char **id_list = NULL; id_list = sync_agent_generate_item_luid(1, count); if (id_list != NULL) { for( int i = 0; i < count; i++) { do_something(id_list[i]); } } * @endcode * @param[in] id_provider_code ID's seed value described in F/W initiation config file \\ * @param[in] count number of id to generate * @return operation result * @retval generated_item_luid_list success (new item LUID converted to string) * @retval 0 fail */ char **sync_agent_generate_item_luid(int id_provider_code, int count); /** * @brief Generate new folder LUID to use inside agent, when add new folder * @par Usage: * @code char *folder_id = NULL; folder_id = sync_agent_generate_folder_luid(); do_something(folder_id); * @endcode * @return operation result * @retval folder_luid success (new folder LUID converted to string) * @retval 0 fail */ char *sync_agent_generate_folder_luid(void); /** * @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* LUID_H_ */