Skip to content

Commit

Permalink
Remove temp test code
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Jul 25, 2024
1 parent 9a1780b commit 3736c00
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/native/storage/ffigen.glib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ language: c
output: lib/src/native/linux/glib.ffi.dart
headers:
entry-points:
- /opt/homebrew/Cellar/glib/2.80.3/include/glib-2.0/glib.h
- /opt/homebrew/Cellar/glib/2.80.3/include/glib-2.0/glib-object.h
- /opt/homebrew/Cellar/glib/2.80.3/include/glib-2.0/gio/gio.h
- /usr/include/glib-2.0/glib.h
- /usr/include/glib-2.0/glib-object.h
- /usr/include/glib-2.0/gio/gio.h
compiler-opts:
# Suppress nullability warnings on macOS
- "-Wno-nullability-completeness"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:native_storage/native_storage.dart';
import 'package:native_storage/src/local/local_storage.android.dart';
import 'package:native_storage/src/local/local_storage.linux.dart';
import 'package:native_storage/src/local/local_storage.windows.dart';
import 'package:native_storage/src/local/local_storage_darwin.dart';
import 'package:native_storage/src/native_storage_base.dart';
import 'package:native_storage/src/secure/secure_storage_platform.vm.dart';
import 'package:native_storage/src/util/rescope.dart';
Expand All @@ -17,18 +18,18 @@ abstract base class NativeLocalStoragePlatform extends NativeStorageBase
String? namespace,
String? scope,
}) {
// if (Platform.isMacOS || Platform.isIOS) {
// return LocalStoragePlatformDarwin(namespace: namespace, scope: scope);
// }
if (Platform.isLinux) {
return LocalStorageLinux(namespace: namespace, scope: scope);
}
if (Platform.isMacOS || Platform.isIOS) {
return LocalStoragePlatformDarwin(namespace: namespace, scope: scope);
}
if (Platform.isAndroid) {
return LocalStoragePlatformAndroid(namespace: namespace, scope: scope);
}
if (Platform.isWindows) {
return LocalStorageWindows(namespace: namespace, scope: scope);
}
if (Platform.isLinux || Platform.isMacOS) {
return LocalStorageLinux(namespace: namespace, scope: scope);
}
throw UnsupportedError('This platform is not yet supported.');
}

Expand Down
14 changes: 14 additions & 0 deletions packages/native/storage/lib/src/native/linux/glib.ffi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,20 @@ typedef gboolean = gint;

final class _GAllocator extends ffi.Opaque {}

/// GObject:
///
/// The base object type.
///
/// All the fields in the `GObject` structure are private to the implementation
/// and should never be accessed directly.
///
/// Since GLib 2.72, all #GObjects are guaranteed to be aligned to at least the
/// alignment of the largest basic GLib type (typically this is #guint64 or
/// #gdouble). If you need larger alignment for an element in a #GObject, you
/// should allocate it on the heap (aligned), or arrange for your #GObject to be
/// appropriately padded. This guarantee applies to the #GObject (or derived)
/// struct, the #GObjectClass (or derived) struct, and any private data allocated
/// by G_ADD_PRIVATE().
final class GObject extends ffi.Struct {
external _GTypeInstance g_type_instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract base class NativeSecureStoragePlatform extends NativeStorageBase
String? namespace,
String? scope,
}) {
if (Platform.isLinux || Platform.isMacOS) {
if (Platform.isLinux) {
return SecureStorageLinux(namespace: namespace, scope: scope);
}
if (Platform.isIOS || Platform.isMacOS) {
Expand Down

0 comments on commit 3736c00

Please sign in to comment.