auth-provider: move auth provider logic into each class

Rather than make all of them rely on MMBaseModem for it. This
lets us disentangle dependencies for easier unit testing.

For interfaces, rather than casting directly to MMBaseModem
use intermediate interfaces (MMIfaceAuth and MMIfaceOpLock)
that tests can fake out.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2025-05-08 20:08:06 -05:00
parent 7262b46a82
commit ef5cee3ab5
28 changed files with 872 additions and 589 deletions
+3 -3
View File
@@ -436,7 +436,7 @@ mm_device_initialize_modem (MMDevice *self)
mm_obj_dbg (self, "modem initializing...");
mm_base_modem_initialize (modem,
MM_BASE_MODEM_OPERATION_LOCK_REQUIRED,
MM_OPERATION_LOCK_REQUIRED,
(GAsyncReadyCallback)initialize_ready,
g_object_ref (self));
}
@@ -868,8 +868,8 @@ mm_device_inhibit (MMDevice *self,
* an exclusive lock marked as override, so the modem object will not
* allow any additional lock request any more. */
mm_base_modem_disable (self->priv->modem,
MM_BASE_MODEM_OPERATION_LOCK_REQUIRED,
MM_BASE_MODEM_OPERATION_PRIORITY_OVERRIDE,
MM_OPERATION_LOCK_REQUIRED,
MM_OPERATION_PRIORITY_OVERRIDE,
(GAsyncReadyCallback)inhibit_disable_ready,
task);
}