1 /* *****************************************************************
3 * Copyright 2016 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 * *****************************************************************/
24 * Sends Sign UP request to cloud
26 * @param[in] endPoint peer endpoint
27 * @param[in] authProvider authentication provider
28 * @param[in] authToken authentication token
29 * @param[in] response response callback
30 * @return OCStackResult application result
32 OCStackResult CloudSignUp(OCDevAddr *endPoint, const char *authProvider, const char *authToken,
33 OCClientResponseHandler response);
36 * Sends Sign IN request to cloud
38 * @param[in] endPoint peer endpoint
39 * @param[in] response response callback
40 * @return OCStackResult application result
42 OCStackResult CloudSignIn(OCDevAddr *endPoint, OCClientResponseHandler response);
45 * Sends Sign IN request to cloud
47 * @param[in] endPoint peer endpoint
48 * @param[in] response response callback
49 * @return OCStackResult application result
51 OCStackResult CloudSignOut(OCDevAddr *endPoint, OCClientResponseHandler response);
54 * Sends Sign Up request to cloud
56 * @param[in] ctx context
57 * @param[in] handle handle
58 * @param[in] response response from peer
59 * @return OCStackApplicationResult application result
61 OCStackApplicationResult handleCloudSignUpResponse(void *ctx,
63 OCClientResponse *response);
66 * Sends Sign In request to cloud
68 * @param[in] ctx context
69 * @param[in] handle handle
70 * @param[in] response response from peer
71 * @return OCStackApplicationResult application result
73 OCStackApplicationResult handleCloudSignInResponse(void *ctx,
75 OCClientResponse *response);
78 * Sends Sign Out request to cloud
80 * @param[in] ctx context
81 * @param[in] handle handle
82 * @param[in] response response from peer
83 * @return OCStackApplicationResult application result
85 OCStackApplicationResult handleCloudSignOutResponse(void *ctx,
87 OCClientResponse *response);
90 #endif // CLOUD_AUTH_H