diff options
Diffstat (limited to 'include/mo-handler/dm_mo_common.h')
-rwxr-xr-x | include/mo-handler/dm_mo_common.h | 635 |
1 files changed, 635 insertions, 0 deletions
diff --git a/include/mo-handler/dm_mo_common.h b/include/mo-handler/dm_mo_common.h new file mode 100755 index 0000000..42dbe0d --- /dev/null +++ b/include/mo-handler/dm_mo_common.h @@ -0,0 +1,635 @@ +/* + * oma-dm-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 DM_MO_COMMON_H_ +#define DM_MO_COMMON_H_ + +/*sync-agent*/ +#include <sync_agent.h> + +/*dm-agent*/ +#include "common/dm_common.h" +#include "dm_mo_common_internal.h" +#include "serviceadapter/sa_define.h" + +/*================================================================= + * DM MO COMMON + * ================================================================= + */ + +/** + * @par Description: API to free dm acc + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] dm_acc structure + * + * @return DM_OK success + * DM_ERROR fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +void free_dm_acc(dm_acc * dmaccount); + +/** + * @par Description: API to get_client_dmacc + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server id server id + * @param[out] client id client id + * @param[out] client pw client pw + * @param[out] source url source url + * @param[out] target url targer url + * @param[out] base64 base64 + * @param[out] nextnonce nextnonce + * @param[out] authType authType + * + * @return DM_OK success + * DM_ERROR fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_client_dmacc(char *pServer_id, char **client_id, char **client_pwd, char **sourceUrl, char **targetUrl, int *isBase64, char **nextNonce, char **authType); + +/** + * @par Description: API to get_server_dmacc + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server id server id + * @param[out] client id client id + * @param[out] client pw client pw + * @param[out] source url source url + * @param[out] target url targer url + * @param[out] base64 base64 + * @param[out] nextnonce nextnonce + * @param[out] authType authType + * + * @return DM_OK success + * DM_ERROR fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_server_dmacc(char *pServer_id, char **server_id, char **server_pwd, char **sourceUrl, char **targetUrl, int *isBase64, char **nextNonce, char **authType); + +/** + * @par Description: API to update dm acc + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server id server id + * @param[out] dm_acc structure + * + * @return 1 success + * 0 fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +int update_dmacc(char *pServer_id, dm_acc * dmaccount); + +/** + * @par Description: API to get dm acc auth type + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server id server id + * @param[out] AuthType Auth type + * + * @return DM_OK success + * DM_ERROR fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_dmacc_authType(char *pServer_id, AuthType * pAuthType); + +/** + * @par Description: API to get_format + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] mo format mo format + * @param[out] format format + * + * @return DM_OK success + * DM_ERROR fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_format(sync_agent_dm_mo_format_e format_enum, char **format); + +/** + * @par Description: API to get_format_enum + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] format format + * @param[out] format_enum format_enum + * + * @return DM_OK success + * DM_ERROR fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_format_enum(char *format, sync_agent_dm_mo_format_e * format_enum); + +/** + * @par Description: API to get_contenttype + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] mo contenttype mo contenttype + * @param[out] contenttype contenttype + * + * @return DM_OK success + * DM_ERROR fail + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + +DM_ERROR get_contenttype(sync_agent_dm_mo_df_type_e contenttype_enum, char **contenttype); +*/ + +/** + * @par Description: API to reset dmacc mscserver + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * + * @return + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +void reset_dmacc_mscserver(); + +/** + * @par Description: API to reset dmacc msctestserver + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * + * @return + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +void reset_dmacc_msctestserver(); + +/** + * @par Description: API to get_format + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * + * @return + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +void reset_dmacc_gcf(); + +/** + * @par Description: API to reset_devinfo + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * + * @return + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +void reset_devinfo(); + +/** + * @par Description: API to reset_devdetail + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * + * @return + * + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +void reset_devdetail(); + +/** + * @par Description: API to get_mo_root_path + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] mo full path + * @param[in] root path + * + * @return DM_OK success + * DM_ERROR fail + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_mo_root_path(const char *mo_full_path, char **root_path); + +/** + * @par Description: API to get_engine_type_by_serverid + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server id + * + * @return SERVICE_SERVER_TYPE + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +SERVICE_SERVER_TYPE get_engine_type_by_serverid(const char *server_id); + +/** + * @par Description: API to get_engine_type_by_serverid + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] mo full path + * + * @return SERVICE_SERVER_TYPE + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +SERVICE_SERVER_TYPE get_service_type(const char *mo_full_path); + +/** + * @par Description: API to get server id + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server type + * @param[out] server id + * + * @return SERVICE_SERVER_TYPE + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_Serverid(SERVICE_SERVER_TYPE mo_type, char **server_id); + +/** + * @par Description: API to get server type + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server_id + * @param[out] mo_type + * + * @return SERVICE_SERVER_TYPE + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_server_type(char *server_id, int *mo_type); + +/** + * @par Description: API to add dm acc + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] server_type server type + * + * @return DM_OK + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR add_dm_acc(SERVICE_SERVER_TYPE server_type); + +/** + * @par Description: API to remove dm acc + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] mo_path mo full path + * + * @return DM_OK + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR remove_dm_acc(char *mo_path); + +/** + * @par Description: API to check dm acc + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] dmacc_type dm acc type + * @param[out] is_exist check exist flag + * + * @return DM_OK + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR is_exist_dmacc(SERVICE_SERVER_TYPE dmacc_type, int *is_exist); + +/*================================================================= + * FOR TEST + * ================================================================= + */ +/** + * @par Description: API to this code is temp code fo test + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * + * @return + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +/* +void dmacc_define_fumo(); +void dmacc_define_lawmo(); +void devinfo_define(); +void devdetail_define(); +void fumo_define(); +void lawmo_define(); +*/ + +#endif /* DM_MO_COMMON_H_ */ |