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>
The auth provider setup is a bit over-engineered. Simplify it by
making a single MMAuthProvider object that may or may not use polkit,
depending on configure options. This object is also setup as a
singleton object using the helper MM_DEFINE_SINGLETON_GETTER().
We get rid of the MMAuthRequests; and we leave up to the caller and user of the
MMAuthProvider the handling of request cancellations through the provided
GCancellable.
Also made GIO-async-friendly methods.
While porting to GDBus, use opaque pointers. This allows us to include either a
DBusGMethodInvocation or a GDBusMethodInvocation in the 'context' pointer.
Once fully ported to GDBus, we can safely change it back to make the context be
a GDBusMethodInvocation.
When the support is complete, use --with-polkit to enable
PolicyKit support. It's not there yet, but this commit adds an
authorization provider framework which will be extended to allow
hooking into PolicyKit.