1 //******************************************************************
3 // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
25 const char *getResult(OCStackResult result) {
29 case OC_STACK_RESOURCE_CREATED:
30 return "OC_STACK_RESOURCE_CREATED";
31 case OC_STACK_RESOURCE_DELETED:
32 return "OC_STACK_RESOURCE_DELETED";
33 case OC_STACK_INVALID_URI:
34 return "OC_STACK_INVALID_URI";
35 case OC_STACK_INVALID_QUERY:
36 return "OC_STACK_INVALID_QUERY";
37 case OC_STACK_INVALID_IP:
38 return "OC_STACK_INVALID_IP";
39 case OC_STACK_INVALID_PORT:
40 return "OC_STACK_INVALID_PORT";
41 case OC_STACK_INVALID_CALLBACK:
42 return "OC_STACK_INVALID_CALLBACK";
43 case OC_STACK_INVALID_METHOD:
44 return "OC_STACK_INVALID_METHOD";
45 case OC_STACK_NO_MEMORY:
46 return "OC_STACK_NO_MEMORY";
47 case OC_STACK_COMM_ERROR:
48 return "OC_STACK_COMM_ERROR";
49 case OC_STACK_INVALID_PARAM:
50 return "OC_STACK_INVALID_PARAM";
51 case OC_STACK_NOTIMPL:
52 return "OC_STACK_NOTIMPL";
53 case OC_STACK_NO_RESOURCE:
54 return "OC_STACK_NO_RESOURCE";
55 case OC_STACK_RESOURCE_ERROR:
56 return "OC_STACK_RESOURCE_ERROR";
57 case OC_STACK_SLOW_RESOURCE:
58 return "OC_STACK_SLOW_RESOURCE";
59 case OC_STACK_NO_OBSERVERS:
60 return "OC_STACK_NO_OBSERVERS";
62 case OC_STACK_VIRTUAL_DO_NOT_HANDLE:
63 return "OC_STACK_VIRTUAL_DO_NOT_HANDLE";
64 case OC_STACK_PRESENCE_STOPPED:
65 return "OC_STACK_PRESENCE_STOPPED";
66 case OC_STACK_PRESENCE_TIMEOUT:
67 return "OC_STACK_PRESENCE_TIMEOUT";
70 return "OC_STACK_ERROR";