1 /******************************************************************
3 * Copyright 2014 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 ******************************************************************/
22 * @file caremotehandler.h
23 * @brief This file contains common utility function for remote endpoints
26 #ifndef __CA_REMOTE_HANDLER_H_
27 #define __CA_REMOTE_HANDLER_H_
41 * @brief Creates a new remote endpoint from the input endpoint
42 * @param endpoint [IN] endpoint information where the data has to be sent
43 * @return remote endpoint created
45 CARemoteEndpoint_t *CACloneRemoteEndpoint(const CARemoteEndpoint_t *endpoint);
48 * @brief Creates a new remote endpoint from the input uri
49 * @param uri [IN] absolute uri information to create remote endpoint
50 * @return remote endpoint created
52 CARemoteEndpoint_t *CACreateRemoteEndpointUriInternal(const CAURI_t uri);
55 * @brief Creates a new remote endpoint from the input and other information
56 * @param resourceUri [IN] absolute uri information to create remote endpoint
57 * @param addr [IN] address of the ednpoint
58 * @param type [IN] connectivity type of the endpoint
59 * @return remote endpoint created
61 CARemoteEndpoint_t *CACreateRemoteEndpointInternal(const CAURI_t resourceUri,
62 const CAAddress_t addr, const CAConnectivityType_t type);
65 * @brief Destroy remote endpoint
66 * @param endpoint [IN] endpoint information where the data has to be sent
69 void CADestroyRemoteEndpointInternal(CARemoteEndpoint_t *rep);
72 * @brief Creates a new request information
73 * @param rep [IN] request information that needs to be duplicated
74 * @return remote endpoint created
76 CARequestInfo_t *CACloneRequestInfo(const CARequestInfo_t *request);
79 * @brief Destroy the request information
80 * @param rep [IN] request information that needs to be destroyed
83 void CADestroyRequestInfoInternal(CARequestInfo_t *request);
86 * @brief Creates a new response information
87 * @param rep [IN] response information that needs to be duplicated
88 * @return remote endpoint created
90 CAResponseInfo_t *CACloneResponseInfo(const CAResponseInfo_t *response);
93 * @brief Destroy the response information
94 * @param rep [IN] response information that needs to be destroyed
97 void CADestroyResponseInfoInternal(CAResponseInfo_t *response);
103 #endif //#ifndef __CA_REMOTE_HANDLER_H_