mirror of
https://github.com/team-infusion-developers/android_device_samsung_msm8976-common.git
synced 2024-11-01 03:47:42 +00:00
61a4c37735
msm8976-common: ril: add open-sourced libsecnativefeature, used by libsec-ril Change-Id: I2f487db23b31c63ba919863f393ca37cc9a81191 libsecnativefeature: fix build with clang Change-Id: Ibda3234af2b1184e094913e35cb919a75f972c87 Change-Id: Iaaa06fa527cedce6609a95b21d787c13dda6a30a
85 lines
1.6 KiB
C++
85 lines
1.6 KiB
C++
#include <string>
|
|
#include <iostream>
|
|
#include "SecNativeFeatureCppIf.h"
|
|
#include "SecNativeFeatureCIf.h"
|
|
#include <expat.h>
|
|
#include <stdlib.h>
|
|
|
|
|
|
int
|
|
SecNativeFeature_getEnableStatus(const char* tag)
|
|
{
|
|
SecNativeFeature* instance = SecNativeFeature::getInstance();
|
|
|
|
if (instance)
|
|
{
|
|
return instance->getEnableStatus(tag);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
SecNativeFeature_getEnableStatusWithDefault(const char* tag, int defaultValue)
|
|
{
|
|
SecNativeFeature* instance = SecNativeFeature::getInstance();
|
|
|
|
if (instance)
|
|
{
|
|
return instance->getEnableStatus(tag, defaultValue);
|
|
}
|
|
|
|
return defaultValue;
|
|
}
|
|
|
|
int
|
|
SecNativeFeature_getInteger(const char* tag)
|
|
{
|
|
SecNativeFeature* instance = SecNativeFeature::getInstance();
|
|
|
|
if (instance)
|
|
{
|
|
return instance->getInteger(tag);
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
|
|
int
|
|
SecNativeFeature_getIntegerWithDefault(const char* tag, int defaultValue)
|
|
{
|
|
SecNativeFeature* instance = SecNativeFeature::getInstance();
|
|
|
|
if (instance)
|
|
{
|
|
return instance->getInteger(tag, defaultValue);
|
|
}
|
|
|
|
return defaultValue;
|
|
}
|
|
|
|
const char*
|
|
SecNativeFeature_getString(const char* tag)
|
|
{
|
|
SecNativeFeature* instance = SecNativeFeature::getInstance();
|
|
|
|
if (instance)
|
|
{
|
|
return instance->getString(tag);
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
const char*
|
|
SecNativeFeature_getStringWithDefault(const char* tag, char* defaultValue)
|
|
{
|
|
SecNativeFeature* instance = SecNativeFeature::getInstance();
|
|
|
|
if (instance)
|
|
{
|
|
return instance->getString(tag, defaultValue);
|
|
}
|
|
|
|
return defaultValue;
|
|
}
|