blob: afaaed876935fee56b09041e2678cf91df99bb81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef SM_ERROR_H
#define SM_ERROR_H
#include "sm-def.h"
char* get_response_audiomanager_massage_error(int am_error_code)
{
switch (am_error_code){
case OK:
return "OK";
case UNKNOWN:
return "unknown error";
case OUT_RANGE:
return "value out of range";
case NOT_USED:
return "not used";
case DATABASE_ERR:
return "database error occured";
case OBJECT_ALREADY_EXIST:
return "the desired object already exists";
case NO_CHANGE:
return "there is no change";
case ACTION_IMPOSSIBLE:
return "the desired action is not possible";
case OBJECT_NOT_EXIST:
return "the desired object is non existent";
case ASYNC_ACTION_ABORTED:
return "the asynchronous action was aborted";
case CONNECTION_FORMAT_ERR:
return "connectionFormat is not selected";
case COMMUNICATION_ERR:
return "communication error";
case EVENT_NOT_EXIST:
return "desired event doesn't exist";
default:
return "Audio Manager responsed unknown error number";
}
}
char* get_source_state_key(int am_source_state){
switch (am_source_state){
case 0:
return "unknown";
case 1:
return "on";
case 2:
return "off";
case 3:
return "paused";
default:
return "";
}
}
#endif
|