2026-02-05 12:42:53 -05:00
|
|
|
import 'package:pigeon/pigeon.dart';
|
|
|
|
|
|
|
|
|
|
class ClientCertData {
|
|
|
|
|
Uint8List data;
|
|
|
|
|
String password;
|
|
|
|
|
|
|
|
|
|
ClientCertData(this.data, this.password);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ClientCertPrompt {
|
|
|
|
|
String title;
|
|
|
|
|
String message;
|
|
|
|
|
String cancel;
|
|
|
|
|
String confirm;
|
|
|
|
|
|
|
|
|
|
ClientCertPrompt(this.title, this.message, this.cancel, this.confirm);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ConfigurePigeon(
|
|
|
|
|
PigeonOptions(
|
|
|
|
|
dartOut: 'lib/platform/network_api.g.dart',
|
|
|
|
|
swiftOut: 'ios/Runner/Core/Network.g.swift',
|
|
|
|
|
swiftOptions: SwiftOptions(includeErrorClass: false),
|
|
|
|
|
kotlinOut:
|
|
|
|
|
'android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt',
|
|
|
|
|
kotlinOptions: KotlinOptions(package: 'app.alextran.immich.core', includeErrorClass: true),
|
|
|
|
|
dartOptions: DartOptions(),
|
|
|
|
|
dartPackageName: 'immich_mobile',
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
@HostApi()
|
|
|
|
|
abstract class NetworkApi {
|
|
|
|
|
@async
|
|
|
|
|
void addCertificate(ClientCertData clientData);
|
|
|
|
|
|
|
|
|
|
@async
|
2026-03-05 12:04:45 -05:00
|
|
|
void selectCertificate(ClientCertPrompt promptText);
|
2026-02-05 12:42:53 -05:00
|
|
|
|
|
|
|
|
@async
|
|
|
|
|
void removeCertificate();
|
2026-03-05 12:04:45 -05:00
|
|
|
|
|
|
|
|
bool hasCertificate();
|
|
|
|
|
|
|
|
|
|
int getClientPointer();
|
|
|
|
|
|
2026-03-11 12:07:27 -05:00
|
|
|
void setRequestHeaders(Map<String, String> headers, List<String> serverUrls, String? token);
|
2026-05-21 13:25:20 -04:00
|
|
|
|
|
|
|
|
String getAppGroupId();
|
2026-02-05 12:42:53 -05:00
|
|
|
}
|