3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
23 #endif /* __cplusplus */
27 * @brief Support to generate unique ID
30 /** @addtogroup data_adapter
35 * @brief Generate new item LUID to use inside agent, when add new item
36 * @remarks Generated Sequence ID ( 1, 2, 3, .... ) to max ID value described in F/W initiation config file \<ID-Provider\>\<MaxID\>
40 char **id_list = NULL;
42 id_list = sync_agent_generate_item_luid(1, count);
43 if (id_list != NULL) {
44 for( int i = 0; i < count; i++) {
45 do_something(id_list[i]);
50 * @param[in] id_provider_code ID's seed value described in F/W initiation config file \<ID-Provider\>\<Code\>
51 * @param[in] count number of id to generate
52 * @return operation result
53 * @retval generated_item_luid_list success (new item LUID converted to string)
56 char **sync_agent_generate_item_luid(int id_provider_code, int count);
59 * @brief Generate new folder LUID to use inside agent, when add new folder
63 char *folder_id = NULL;
65 folder_id = sync_agent_generate_folder_luid();
66 do_something(folder_id);
69 * @return operation result
70 * @retval folder_luid success (new folder LUID converted to string)
73 char *sync_agent_generate_folder_luid(void);
81 #endif /* __cplusplus */