AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ResultCode.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKASSETSINTERFACES_RESULTCODE_H_
17 #define ACSDKASSETSINTERFACES_RESULTCODE_H_
18 
19 namespace alexaClientSDK {
20 namespace acsdkAssets {
21 namespace commonInterfaces {
22 
23 // Result codes values here are a match between DAVS server codes and davs client codes
24 enum class ResultCode {
25  CONNECTION_FAILED = 47,
27  CHECKSUM_MISMATCH = -52,
28  NO_SPACE_AVAILABLE = -53,
29  SUCCESS = 200,
30  UP_TO_DATE = 304,
31  ILLEGAL_ARGUMENT = 400,
32  UNAUTHORIZED = 401,
33  FORBIDDEN = 403,
34  NO_ARTIFACT_FOUND = 404,
35  UNPACK_FAILURE = -997,
36  UNHANDLED_MIME_TYPE = -998,
38 };
39 
40 inline std::ostream& operator<<(std::ostream& os, ResultCode result) {
41  switch (result) {
43  return os << "CONNECTION_FAILED";
45  return os << "CONNECTION_TIMED_OUT";
47  return os << "CHECKSUM_MISMATCH";
49  return os << "NO_SPACE_AVAILABLE";
51  return os << "SUCCESS";
53  return os << "UP_TO_DATE";
55  return os << "ILLEGAL_ARGUMENT";
57  return os << "UNAUTHORIZED";
59  return os << "FORBIDDEN";
61  return os << "NO_ARTIFACT_FOUND";
63  return os << "UNHANDLED_MIME_TYPE";
65  return os << "CATASTROPHIC_FAILURE";
67  return os << "UNPACK_FAILURE";
68  }
69  return os;
70 }
71 
72 } // namespace commonInterfaces
73 } // namespace acsdkAssets
74 } // namespace alexaClientSDK
75 
76 #endif // ACSDKASSETSINTERFACES_RESULTCODE_H_
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::ostream & operator<<(std::ostream &os, Priority value)
Definition: Priority.h:49

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0