00001 /* 00002 * Copyright 2008-2010 Arsen Chaloyan 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 * 00016 * $Id: mrcp_resource_factory.h 1632 2010-03-30 20:46:25Z achaloyan $ 00017 */ 00018 00019 #ifndef MRCP_RESOURCE_FACTORY_H 00020 #define MRCP_RESOURCE_FACTORY_H 00021 00022 /** 00023 * @file mrcp_resource_factory.h 00024 * @brief Aggregation of MRCP Resources 00025 */ 00026 00027 #include "apt_text_stream.h" 00028 #include "mrcp_types.h" 00029 00030 APT_BEGIN_EXTERN_C 00031 00032 /** Create MRCP resource factory */ 00033 MRCP_DECLARE(mrcp_resource_factory_t*) mrcp_resource_factory_create(apr_size_t resource_count, apr_pool_t *pool); 00034 00035 /** Destroy MRCP resource factory */ 00036 MRCP_DECLARE(apt_bool_t) mrcp_resource_factory_destroy(mrcp_resource_factory_t *resource_factory); 00037 00038 /** Register MRCP resource */ 00039 MRCP_DECLARE(apt_bool_t) mrcp_resource_register(mrcp_resource_factory_t *resource_factory, mrcp_resource_t *resource); 00040 00041 /** Get MRCP resource by resource id */ 00042 MRCP_DECLARE(mrcp_resource_t*) mrcp_resource_get(const mrcp_resource_factory_t *resource_factory, mrcp_resource_id resource_id); 00043 00044 /** Find MRCP resource by resource name */ 00045 MRCP_DECLARE(mrcp_resource_t*) mrcp_resource_find(const mrcp_resource_factory_t *resource_factory, const apt_str_t *name); 00046 00047 00048 APT_END_EXTERN_C 00049 00050 #endif /* MRCP_RESOURCE_FACTORY_H */