new kfxEngine()
Methods
(static) createBundleCacheProvider(successCallback, errorCallback, filePath)
this method is used to get the instance of bundle cache provider with the specified path
Parameters:
Name | Type | Description |
---|---|---|
successCallback |
function | Default Success call back function name |
errorCallback |
function | Default Error call back function name |
filePath |
String | Path to the folder where cached files should be stored. |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back would return a JSON object with ErrorMsg & ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - KMC_SUCCESS success call back will contain the created bundleCacheProvider.
errorCallback - error message would contain the appropriate error description.Possible error objects are Wrong Parameters,KmcRuntimeException,Exception.
Example
function successCallback(provider){
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var bundleProviderInstance = kfxCordova.kfxEngine.createBundleCacheProvider(successCallback,errorCallback,filePath);
(static) createImageArray()
this method is used to get the instance of image array
Example
var imageArrayInstance = kfxCordova.kfxEngine.createImageArray();
(static) createImageFromBase64(successCallback, errorCallback, base64String)
Method to convert an image in the form of base64string to a KEDImage. The KEDImage is stored in the ImageArray and the
corresponding id is returned in the call back.
Parameters:
Name | Type | Description |
---|---|---|
successCallback |
function | Default Success call back function name |
errorCallback |
function | Default Error call back function name |
base64String |
String | an input image in the form of base64 string to be converted to KEDImage |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back would return a JSON object with ErrorMsg & ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - KMC_SUCCESS success call back will have the image id of the converted KEDImage(from input base64 string).
errorCallback - error message would contain the appropriate error description.Possible error objects are Wrong Parameters,KmcRuntimeException,Exception.
Example
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var imageArray = kfxCordova.kfxEngine.createImageFromBase64(successCallback,errorCallback, 'base64string');
(static) createImageFromFilePath(successCallback, errorCallback, options)
Method to create and store a KEDImage in the ImageArray. The KEDImage is created from the image specified in the input
file location.
Parameters:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
successCallback |
function | Default Success call back function name | ||||||||
errorCallback |
function | Default Error call back function name | ||||||||
options |
Object | variable representing a physical location of an image which need to be converted to a KEDImage
Properties
|
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back would return a JSON object with ErrorMsg & ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - KMC_SUCCESS success call back will have the image id of the converted KEDImage(from input image mentioned in the file path )
errorCallback - error message would contain the appropriate error description.Possible error objects are Wrong Parameters,KmcRuntimeException,Exception.
Example
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var externalDirectoryPath = cordova.file.externalRootDirectory;
var imageFilePath = externalDirectoryPath + "Download/myfile.jpg";
var imageArray = kfxCordova.kfxEngine.createImageFromFilePath(successCallback,errorCallback, {"filePath":imageFilePath});
(static) createImageObject()
this method is used to get the instance of image object
Example
var imageObjectInstance = kfxCordova.kfxEngine.createImageObject();
(static) createImageProcessor()
this method is used to get the instance of image processor
Example
var imageProcessorInstance = kfxCordova.kfxEngine.createImageProcessor();
(static) createLocalProjectProvider(successCallback, errorCallback, filePath)
this method is used to get the instance of local project provider
Parameters:
Name | Type | Description |
---|---|---|
successCallback |
function | Default Success call back function name |
errorCallback |
function | Default Error call back function name |
filePath |
String | Path to the folder containing zip files. |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back would return a JSON object with ErrorMsg & ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - KMC_SUCCESS success call back will contain the created localCacheProvider.
errorCallback - error message would contain the appropriate error description.Possible error objects are Wrong Parameters,KmcRuntimeException,Exception.
Examples
function successCallback(provider){
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var localProviderInstance = kfxCordova.kfxEngine.createLocalProjectProvider(successCallback,errorCallback,filePath);
(static) createOnDeviceExtraction()
this method is used to get the instance of on device extraction
Example
var onDeviceExtractionInstance = kfxCordova.kfxEngine.createOnDeviceExtraction();
(static) createQuickExtractor()
this method is used to get the instance of Quick Extractor
Example
var quickExtractorInstance = kfxCordova.kfxEngine.createQuickExtractor();
(static) createServerProjectProvider(successCallback, errorCallback, serverUrl-Initializes)
this method is used to get the instance of server project provider
Parameters:
Name | Type | Description |
---|---|---|
successCallback |
function | Default Success call back function name |
errorCallback |
function | Default Error call back function name |
serverUrl-Initializes |
String | the object with serverl URL. |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back would return a JSON object with ErrorMsg & ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - KMC_SUCCESS success call back will contain the created serverCacheProvider.
errorCallback - error message would contain the appropriate error description.Possible error objects are Wrong Parameters,KmcRuntimeException,Exception.
Examples
function successCallback(provider){
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var serverProviderInstance = kfxCordova.kfxEngine.createServerProjectProvider(successCallback,errorCallback,serverUrl);