2 * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
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 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <afb/afb-binding.h>
25 typedef enum REQ_ERROR
33 static const char* cmd_evlist[] = {
36 "removedMainConnection",
37 "sinkMuteStateChanged",
38 "mainConnectionStateChanged"
41 static const char* route_evlist[] = {
46 "asyncSetSourceState",
50 struct sound_property_s{
54 struct availability_s{
56 gint32 avalilable_reason;
58 struct notification_config_s{
63 struct main_sound_property_s{
64 gint32 type; /* am_CustomMainSoundPropertyType_t */
78 REQ_ERROR get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id);
79 REQ_ERROR get_value_int16(const struct afb_req request, const char *source, int16_t *out_id);
80 REQ_ERROR get_value_int32(const struct afb_req request, const char *source, int32_t *out_id);
81 void sm_add_object_to_json_object(struct json_object* j_obj, int count, ...);
82 void sm_add_object_to_json_object_func(struct json_object* j_obj, const char* verb_name, int count, ...);
83 int sm_search_event_name_index(const char* value);
84 int sm_search_routing_event_name_index(const char* value);
85 GVariant* create_source_data(guint16 sourceID, guint16 domainID, const char* appname, guint16 sourceClassID,
86 gint32 sourceState, gint16 volume, gboolean visible, struct availability_s availables,
87 guint16 interrupt, struct sound_property_s soundPropertyList, gint32 connectionFormatList,
88 struct main_sound_property_s mainPropertyList, struct notification_config_s NConfRouting,
89 struct notification_config_s NConfCommand, struct afb_binding_interface* afbitf);
90 GVariant* create_domain_data(struct domain_data*, struct afb_binding_interface* afbitf);
93 #endif /*AM_HELPER_H*/