Skip to content

Commit 0952218

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 7cafd5b + e5e65c6 commit 0952218

File tree

596 files changed

+4228
-570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

596 files changed

+4228
-570
lines changed

AsposeWordsCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AsposeWordsCloud'
3-
s.version = '22.9'
3+
s.version = '22.10'
44
s.summary = 'Aspose Words for Cloud.'
55
s.homepage = 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ This repository contains Aspose.Words Cloud SDK for Swift source code. This SDK
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 22.10
17+
18+
- Added 'CacheHeaderFooterShapes' property for PdfSaveOptionsData class.
19+
- FileReference structure has been added that allows to determine how the document will be accessed: from the remote storage, or loaded directly in the request.
20+
- The 'AppendDocument' and 'AppendDocumentOnline' methods takes a 'FileReference' instead of an 'href' property.
21+
- Added property 'StartingNumber' for 'PageNumbers' class.
22+
- Added property 'GlobalCultureName' for 'FieldOptions' class.
23+
24+
1625
## Enhancements in Version 22.9
1726

1827
- CompressDocument method now can handle images.
@@ -234,7 +243,7 @@ Add link to this repository as dependency to your Package.swift:
234243

235244
dependencies: [
236245
// Dependencies declare other packages that this package depends on.
237-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "22.9"),
246+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "22.10"),
238247
],
239248
targets: [
240249
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -252,7 +261,7 @@ targets: [
252261
Add link to git repository as dependency to your Podfile:
253262

254263
```ruby
255-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '22.9'
264+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '22.10'
256265
```
257266

258267
## Getting Started

Sources/AsposeWordsCloud/Api/ApiInvoker.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ public class ApiInvoker {
8888
public var access_token : String?;
8989
}
9090

91+
// Internal function for prepare files content list
92+
public func prepareFilesContent(_ : inout [FileReference]) {
93+
// Do nothing...
94+
}
95+
9196
// Invoke request to the API with the specified set of arguments and execute callback after the request is completed
9297
public func invoke(apiRequestData : WordsApiRequestData, callback: @escaping (_ response: Data?, _ headers: [String: String], _ error: Error?) -> ()
9398
) {

Sources/AsposeWordsCloud/Api/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,6 @@ public class Configuration : Codable {
188188

189189
// Returns SDK version for using in statistics headers
190190
public func getSdkVersion() -> String {
191-
return "22.9";
191+
return "22.10";
192192
}
193193
}

Sources/AsposeWordsCloud/Api/RequestFormParam.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ import Foundation
3131
@available(macOS 10.12, iOS 10.3, watchOS 3.3, tvOS 12.0, *)
3232
public struct RequestFormParam {
3333
private let name : String?;
34+
private let filename : String?;
3435
private let body : Data;
3536
private let contentType : String;
3637

3738
public init(name : String?, body : Data, contentType : String) {
3839
self.name = name;
40+
self.filename = nil;
41+
self.body = body;
42+
self.contentType = contentType;
43+
}
44+
45+
public init(name : String?, filename : String?, body : Data, contentType : String) {
46+
self.name = name;
47+
self.filename = filename;
3948
self.body = body;
4049
self.contentType = contentType;
4150
}
@@ -44,6 +53,10 @@ public struct RequestFormParam {
4453
return self.name;
4554
}
4655

56+
public func getFilename() -> String? {
57+
return self.filename;
58+
}
59+
4760
public func getBody() -> Data {
4861
return self.body;
4962
}

Sources/AsposeWordsCloud/Api/WordsApiModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ import Foundation
3030
// General protocol for all models.
3131
@available(macOS 10.12, iOS 10.3, watchOS 3.3, tvOS 12.0, *)
3232
public protocol WordsApiModel {
33-
33+
func collectFilesContent(_ resultFilesContent : inout [FileReference]);
3434
}

Sources/AsposeWordsCloud/Api/WordsApiRequestData.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ public struct WordsApiRequestData {
8282
if (formParam.getName() != nil) {
8383
formBody.append("; name=\"\(formParam.getName()!)\"".data(using: .utf8)!);
8484
}
85+
if (formParam.getFilename() != nil) {
86+
formBody.append("; filename=\"\(formParam.getFilename()!)\"".data(using: .utf8)!);
87+
}
8588
formBody.append("\r\n\r\n".data(using: .utf8)!);
8689
formBody.append(formParam.getBody());
8790
}

Sources/AsposeWordsCloud/Model/ApiError.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ public class ApiError : Codable, WordsApiModel {
135135
}
136136
}
137137

138+
public func collectFilesContent(_ resultFilesContent : inout [FileReference]) {
139+
}
140+
138141
// Sets code. Gets or sets the API error code.
139142
public func setCode(code : String?) -> ApiError {
140143
self.code = code;

Sources/AsposeWordsCloud/Model/AvailableFontsResponse.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ public class AvailableFontsResponse : WordsResponse {
9999
}
100100
}
101101

102+
public override func collectFilesContent(_ resultFilesContent : inout [FileReference]) {
103+
}
104+
102105
// Sets additionalFonts. Gets or sets the list of additional fonts, provided by Aspose team.
103106
public func setAdditionalFonts(additionalFonts : [FontInfo]?) -> AvailableFontsResponse {
104107
self.additionalFonts = additionalFonts;

Sources/AsposeWordsCloud/Model/BaseEntry.swift

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,49 +27,57 @@
2727

2828
import Foundation
2929

30-
// Represents a entry which will be appended to the original resource document.
30+
// Represents a base class for document which will be appended to the original resource document.
3131
@available(macOS 10.12, iOS 10.3, watchOS 3.3, tvOS 12.0, *)
3232
public class BaseEntry : Codable, WordsApiModel {
33-
// Field of href. Represents a entry which will be appended to the original resource document.
34-
private var _href : String? = nil;
33+
// Field of fileReference. Represents a base class for document which will be appended to the original resource document.
34+
private var _fileReference : FileReference? = nil;
3535

36-
public var href : String? {
36+
public var fileReference : FileReference? {
3737
get {
38-
return self._href;
38+
return self._fileReference;
3939
}
4040
set {
41-
self._href = newValue;
41+
self._fileReference = newValue;
4242
}
4343
}
4444

4545
private enum CodingKeys: String, CodingKey {
46-
case href = "Href";
46+
case fileReference = "FileReference";
4747
case invalidCodingKey;
4848
}
4949

50-
public init() {
50+
internal init() {
5151
}
5252

5353
public required init(from decoder: Decoder) throws {
5454
let container = try decoder.container(keyedBy: CodingKeys.self);
55-
self.href = try container.decodeIfPresent(String.self, forKey: .href);
55+
self.fileReference = try container.decodeIfPresent(FileReference.self, forKey: .fileReference);
5656
}
5757

5858
public func encode(to encoder: Encoder) throws {
5959
var container = encoder.container(keyedBy: CodingKeys.self);
60-
if (self.href != nil) {
61-
try container.encode(self.href, forKey: .href);
60+
if (self.fileReference != nil) {
61+
try container.encode(self.fileReference, forKey: .fileReference);
6262
}
6363
}
6464

65-
// Sets href. Gets or sets the path to entry to append at the server.
66-
public func setHref(href : String?) -> BaseEntry {
67-
self.href = href;
65+
public func collectFilesContent(_ resultFilesContent : inout [FileReference]) {
66+
if (self.fileReference != nil)
67+
{
68+
self.fileReference!.collectFilesContent(&resultFilesContent);
69+
}
70+
71+
}
72+
73+
// Sets fileReference. Gets or sets the file reference.
74+
public func setFileReference(fileReference : FileReference?) -> BaseEntry {
75+
self.fileReference = fileReference;
6876
return self;
6977
}
7078

71-
// Gets href. Gets or sets the path to entry to append at the server.
72-
public func getHref() -> String? {
73-
return self.href;
79+
// Gets fileReference. Gets or sets the file reference.
80+
public func getFileReference() -> FileReference? {
81+
return self.fileReference;
7482
}
7583
}

0 commit comments

Comments
 (0)