mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
90 lines
No EOL
3 KiB
C++
90 lines
No EOL
3 KiB
C++
/*
|
|
* c-dial-plan.cpp
|
|
* Copyright (C) 2010-2017 Belledonne Communications SARL
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#include "linphone/api/c-dial-plan.h"
|
|
|
|
#include "linphone/wrapper_utils.h"
|
|
#include "c-wrapper/c-wrapper.h"
|
|
#include "dial-plan/dial-plan.h"
|
|
|
|
// =============================================================================
|
|
|
|
using namespace std;
|
|
|
|
L_DECLARE_C_OBJECT_IMPL(DialPlan);
|
|
|
|
const char * linphone_dial_plan_get_country(const LinphoneDialPlan *dp) {
|
|
//return L_STRING_TO_C(L_GET_CPP_PTR_FROM_C_OBJECT(dp).getCountry());
|
|
return NULL;
|
|
}
|
|
|
|
const char * linphone_dial_plan_get_iso_country_code(const LinphoneDialPlan *dp) {
|
|
//return L_STRING_TO_C(L_GET_CPP_PTR_FROM_C_OBJECT(dp).getIsoCountryCode());
|
|
return NULL;
|
|
}
|
|
|
|
const char * linphone_dial_plan_get_country_calling_code(const LinphoneDialPlan *dp) {
|
|
//return L_STRING_TO_C(L_GET_CPP_PTR_FROM_C_OBJECT(dp).getCountryCallingCode());
|
|
return NULL;
|
|
}
|
|
|
|
int linphone_dial_plan_get_national_number_length(const LinphoneDialPlan *dp) {
|
|
//return L_GET_CPP_PTR_FROM_C_OBJECT(dp).getNationalNumberLength();
|
|
return -1;
|
|
}
|
|
|
|
const char * linphone_dial_plan_get_international_call_prefix(const LinphoneDialPlan *dp) {
|
|
//return L_STRING_TO_C(L_GET_CPP_PTR_FROM_C_OBJECT(dp).getInternationalCallPrefix());
|
|
return NULL;
|
|
}
|
|
|
|
int linphone_dial_plan_lookup_ccc_from_e164(const char* e164) {
|
|
return LinphonePrivate::DialPlan::lookupCccFromE164(L_C_TO_STRING(e164));
|
|
}
|
|
|
|
int linphone_dial_plan_lookup_ccc_from_iso(const char* iso) {
|
|
return LinphonePrivate::DialPlan::lookupCccFromIso(L_C_TO_STRING(iso));
|
|
}
|
|
|
|
const LinphoneDialPlan* linphone_dial_plan_by_ccc_as_int(int ccc) {
|
|
//LinphonePrivate::DialPlan dp = LinphonePrivate::DialPlan::findByCccAsInt(ccc);
|
|
//return L_GET_C_BACK_PTR();
|
|
return NULL; //TODO
|
|
}
|
|
|
|
const LinphoneDialPlan* linphone_dial_plan_by_ccc(const char *ccc) {
|
|
//LinphonePrivate::DialPlan dp = LinphonePrivate::DialPlan::findByCcc(L_C_TO_STRING(ccc));
|
|
//return L_GET_C_BACK_PTR();
|
|
return NULL; //TODO
|
|
}
|
|
|
|
const LinphoneDialPlan* linphone_dial_plan_get_all() {
|
|
return NULL; //TODO
|
|
}
|
|
|
|
const bctbx_list_t * linphone_dial_plan_get_all_list() {
|
|
//const list<DialPlan> dps = LinphonePrivate::DialPlan::getAllDialPlans();
|
|
//return L_GET_RESOLVED_C_LIST_FROM_CPP_LIST();
|
|
return NULL; //TODO
|
|
}
|
|
|
|
bool_t linphone_dial_plan_is_generic(const LinphoneDialPlan *ccc) {
|
|
//return L_GET_CPP_PTR_FROM_C_OBJECT(ccc).isGeneric();
|
|
return FALSE;
|
|
} |