cordova-plugin-mserviceinterface-2.0 1.0.47 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-mserviceinterface-2.0",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "This plugin establishes the connection to the native interface and performs the requested task.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin.xml CHANGED
@@ -2,7 +2,7 @@
2
2
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
3
3
  xmlns:android="http://schemas.android.com/apk/res/android"
4
4
  id="cordova-plugin-mserviceinterface-2.0"
5
- version="1.0.47">
5
+ version="1.0.48">
6
6
  <name>mserviceinterface-2.0</name>
7
7
  <description>This plugin establishes the connection to the native interface and performs the requested task.</description>
8
8
  <author>selfservit@gmail.com</author>
@@ -99,6 +99,7 @@
99
99
  - (void)GetNewDate:(CDVInvokedUrlCommand*)command;
100
100
  - (id)getCurrentDateTime;
101
101
  -(void)timeValues:(NSString *)date hour:(NSString *)hour minute:(NSString *)minute;
102
+ -(void)SendChatAttachment:(CDVInvokedUrlCommand*)command;
102
103
  - (void)KillTimers;
103
104
  //- (void)AuthenticationRefresh;
104
105
  //- (void)triggerAuthenticationServices:(NSString *)clientId countryCode:(NSString *)countryCode userId:(NSString *)userId sessionId:(NSString *)sessionId localeId:(NSString *)localeId deviceID:(NSString *)deviceID clientUrl:(NSString *)clientUrl cvsUrl:(NSString *)cvsUrl authIndFilePath:(NSString *)authIndFilePath;
@@ -1490,6 +1490,34 @@
1490
1490
  }
1491
1491
  }
1492
1492
 
1493
+ - (void)SendChatAttachment:(CDVInvokedUrlCommand*)command {
1494
+ CDVPluginResult *result = nil;
1495
+ @try {
1496
+ NSString *statusIndication = @"false";
1497
+ NSMutableDictionary *inputObject = [[command arguments] objectAtIndex:0];
1498
+ NSString *filePath = inputObject[@"filePath"];
1499
+ NSString *serverPath = inputObject[@"serverPath"];
1500
+ NSString *fileName = inputObject[@"fileName"];
1501
+ NSString *attachURL = [NSString stringWithFormat:@"%@/common/components/msvFileHandler/UploadFiles.aspx?&client_id=%@&country_code=%@&path=%@", clientUrl, clientID, countryCode, serverPath];
1502
+
1503
+ statusIndication = [self sendFilesToServer:filePath fileName:fileName requestURL:attachURL];
1504
+ if ([statusIndication isEqualToString:@"true"]) {
1505
+ NSString *serviceResult = [NSString stringWithFormat:@"%s", "success"];
1506
+ result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:serviceResult];
1507
+ } else {
1508
+ NSString *serviceResult = [NSString stringWithFormat:@"%s", "failure"];
1509
+ result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:serviceResult];
1510
+ }
1511
+
1512
+ [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
1513
+ } @catch (NSException *exception) {
1514
+ NSString *fail_reason = [NSString stringWithFormat:@"%@\n%@\n%@",exception.name, exception.reason, exception.description ];
1515
+ result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:fail_reason];
1516
+ [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
1517
+ NSLog(@"CheckLocation Exception is : %@", exception.description);
1518
+ }
1519
+ }
1520
+
1493
1521
  #pragma mark - MapViewDelegate
1494
1522
  - (void) locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations{
1495
1523