Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mdmngr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IOPSYS
mdmngr
Commits
6aa7e49f
Commit
6aa7e49f
authored
6 years ago
by
Arun Muthusamy
Browse files
Options
Downloads
Patches
Plain Diff
libmobile_hilink: function that gethers system information
parent
cb28c716
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libmobile_hilink.c
+39
-0
39 additions, 0 deletions
libmobile_hilink.c
with
39 additions
and
0 deletions
libmobile_hilink.c
+
39
−
0
View file @
6aa7e49f
...
@@ -1388,3 +1388,42 @@ struct json_object *mobile_get_software_version_hilink(char *sw_version)
...
@@ -1388,3 +1388,42 @@ struct json_object *mobile_get_software_version_hilink(char *sw_version)
json_object_put
(
result_json
);
json_object_put
(
result_json
);
return
sw_json
;
return
sw_json
;
}
}
struct
json_object
*
mobile_get_system_info_hilink
(
char
*
sw_version
)
{
if
(
!
sw_version
)
return
NULL
;
struct
json_object
*
result_json
=
NULL
,
*
parsed_json
;
struct
key_exchange
*
imei
,
*
software_version
,
*
imsi
,
*
name
,
*
fw_version
,
*
hw_version
;
imei
=
prep_key_obj
(
DEV_INFO_IMEI_H
,
DEV_INFO_IMEI
);
software_version
=
prep_key_obj
(
DEV_INFO_SW_VERSION_H
,
DEV_INFO_SW_VERSION
);
imsi
=
prep_key_obj
(
DEV_INFO_IMSI_H
,
DEV_INFO_IMSI
);
name
=
prep_key_obj
(
DEV_INFO_NAME_H
,
DEV_INFO_NAME
);
fw_version
=
prep_key_obj
(
DEV_INFO_FW_VERSION_H
,
DEV_INFO_FW_VERSION
);
hw_version
=
prep_key_obj
(
DEV_INFO_HW_VERSION_H
,
DEV_INFO_HW_VERSION
);
if
(
!
imei
||
!
software_version
||
!
imsi
||
!
name
||!
fw_version
||
!
hw_version
)
goto
fail_prep_key_obj
;
if
(
strcmp
(
sw_version
,
_software_version
)
==
0
)
result_json
=
mobile_get_device_info_hilink
(
HUAWEI
);
else
result_json
=
mobile_get_device_info_hilink
(
TRE
);
if
(
!
result_json
)
goto
fail_result_json
;
printf
(
"reponse object: %s
\n
"
,
json_object_to_json_string
(
result_json
));
parsed_json
=
get_object_by_keys
(
result_json
,
imei
,
software_version
,
imsi
,
name
,
fw_version
,
hw_version
);
printf
(
"parsed reponse object: %s
\n
"
,
json_object_to_json_string
(
parsed_json
));
json_object_put
(
result_json
);
fail_result_json:
fail_prep_key_obj:
//do - free prep_key_obj
return
parsed_json
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment