Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
30b04f5e
Commit
30b04f5e
authored
Oct 16, 2017
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced linphone_dial_plan_get_all in linphonecore_jni.cc by linphone_dial_plan_get_all_list
parent
454e14d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+13
-11
include/linphone/api/c-dial-plan.h
include/linphone/api/c-dial-plan.h
+2
-1
src/c-wrapper/api/c-dial-plan.cpp
src/c-wrapper/api/c-dial-plan.cpp
+1
-1
No files found.
coreapi/linphonecore_jni.cc
View file @
30b04f5e
...
...
@@ -226,28 +226,30 @@ extern "C" jobjectArray Java_org_linphone_core_LinphoneCoreFactoryImpl_getAllDia
jclass
addr_class
=
env
->
FindClass
(
"org/linphone/core/DialPlanImpl"
);
jmethodID
addr_constructor
=
env
->
GetMethodID
(
addr_class
,
"<init>"
,
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V"
);
jobjectArray
jaddr_array
;
int
i
,
size
=
0
;
countries
=
(
LinphoneDialPlan
*
)
linphone_dial_plan_get_all
();
size_t
i
;
const
bctbx_list_t
*
countries
=
linphone_dial_plan_get_all_list
();
size_t
size
=
bctbx_list_size
(
countries
);
while
(
countries
[
size
].
country
!=
NULL
)
size
++
;
jaddr_array
=
env
->
NewObjectArray
((
int
)
size
,
addr_class
,
NULL
)
;
jaddr_array
=
env
->
NewObjectArray
(
size
,
addr_class
,
NULL
);
for
(
i
=
0
;
i
<
size
;
i
++
)
{
LinphoneDialPlan
*
dp
=
(
LinphoneDialPlan
*
)
countries
->
data
;
for
(
i
=
0
;
i
<
size
;
i
++
)
{
jstring
jcountry
=
env
->
NewStringUTF
(
countries
[
i
].
country
);
jstring
jiso
=
env
->
NewStringUTF
(
countries
[
i
].
iso_country_code
);
jstring
jccc
=
env
->
NewStringUTF
(
countries
[
i
].
ccc
);
jint
jnnl
=
(
jint
)
countries
[
i
].
nnl
;
jstring
jicp
=
env
->
NewStringUTF
(
countries
[
i
].
icp
);
jstring
jcountry
=
env
->
NewStringUTF
(
linphone_dial_plan_get_country
(
dp
));
jstring
jiso
=
env
->
NewStringUTF
(
linphone_dial_plan_get_iso_country_code
(
dp
));
jstring
jccc
=
env
->
NewStringUTF
(
linphone_dial_plan_get_country_calling_code
(
dp
));
jint
jnnl
=
(
jint
)
linphone_dial_plan_get_national_number_length
(
dp
);
jstring
jicp
=
env
->
NewStringUTF
(
linphone_dial_plan_get_international_call_prefix
(
dp
));
jobject
jaddr
=
env
->
NewObject
(
addr_class
,
addr_constructor
,
jcountry
,
jiso
,
jccc
,
jnnl
,
jicp
);
env
->
SetObjectArrayElement
(
jaddr_array
,
i
,
jaddr
);
env
->
SetObjectArrayElement
(
jaddr_array
,
(
int
)
i
,
jaddr
);
env
->
DeleteLocalRef
(
jcountry
);
env
->
DeleteLocalRef
(
jiso
);
env
->
DeleteLocalRef
(
jccc
);
env
->
DeleteLocalRef
(
jicp
);
countries
=
countries
->
next
;
}
return
jaddr_array
;
}
...
...
include/linphone/api/c-dial-plan.h
View file @
30b04f5e
...
...
@@ -79,7 +79,8 @@ LINPHONE_PUBLIC int linphone_dial_plan_lookup_ccc_from_e164(const char* e164);
/**
* Return NULL-terminated array of all known dial plans
* @deprecated use linphone_dial_plan_get_all_list instead
* @deprecated use linphone_dial_plan_get_all_list instead, this method will always return NULL
* @donotwrap
**/
LINPHONE_PUBLIC
const
LinphoneDialPlan
*
linphone_dial_plan_get_all
(
void
);
...
...
src/c-wrapper/api/c-dial-plan.cpp
View file @
30b04f5e
...
...
@@ -76,7 +76,7 @@ const LinphoneDialPlan* linphone_dial_plan_by_ccc(const char *ccc) {
}
const
LinphoneDialPlan
*
linphone_dial_plan_get_all
()
{
return
NULL
;
//TODO
return
NULL
;
}
const
bctbx_list_t
*
linphone_dial_plan_get_all_list
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment