#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.UnixCredentialsMessage
(
UnixCredentialsMessage(..) ,
IsUnixCredentialsMessage ,
toUnixCredentialsMessage ,
noUnixCredentialsMessage ,
#if ENABLE_OVERLOADING
UnixCredentialsMessageGetCredentialsMethodInfo,
#endif
unixCredentialsMessageGetCredentials ,
unixCredentialsMessageIsSupported ,
unixCredentialsMessageNew ,
unixCredentialsMessageNewWithCredentials,
#if ENABLE_OVERLOADING
UnixCredentialsMessageCredentialsPropertyInfo,
#endif
constructUnixCredentialsMessageCredentials,
getUnixCredentialsMessageCredentials ,
#if ENABLE_OVERLOADING
unixCredentialsMessageCredentials ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Objects.Credentials as Gio.Credentials
import {-# SOURCE #-} qualified GI.Gio.Objects.SocketControlMessage as Gio.SocketControlMessage
newtype UnixCredentialsMessage = UnixCredentialsMessage (ManagedPtr UnixCredentialsMessage)
foreign import ccall "g_unix_credentials_message_get_type"
c_g_unix_credentials_message_get_type :: IO GType
instance GObject UnixCredentialsMessage where
gobjectType = c_g_unix_credentials_message_get_type
class (GObject o, O.IsDescendantOf UnixCredentialsMessage o) => IsUnixCredentialsMessage o
instance (GObject o, O.IsDescendantOf UnixCredentialsMessage o) => IsUnixCredentialsMessage o
instance O.HasParentTypes UnixCredentialsMessage
type instance O.ParentTypes UnixCredentialsMessage = '[Gio.SocketControlMessage.SocketControlMessage, GObject.Object.Object]
toUnixCredentialsMessage :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m UnixCredentialsMessage
toUnixCredentialsMessage = liftIO . unsafeCastTo UnixCredentialsMessage
noUnixCredentialsMessage :: Maybe UnixCredentialsMessage
noUnixCredentialsMessage = Nothing
#if ENABLE_OVERLOADING
type family ResolveUnixCredentialsMessageMethod (t :: Symbol) (o :: *) :: * where
ResolveUnixCredentialsMessageMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveUnixCredentialsMessageMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveUnixCredentialsMessageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveUnixCredentialsMessageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveUnixCredentialsMessageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveUnixCredentialsMessageMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveUnixCredentialsMessageMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveUnixCredentialsMessageMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveUnixCredentialsMessageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveUnixCredentialsMessageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveUnixCredentialsMessageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveUnixCredentialsMessageMethod "serialize" o = Gio.SocketControlMessage.SocketControlMessageSerializeMethodInfo
ResolveUnixCredentialsMessageMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveUnixCredentialsMessageMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveUnixCredentialsMessageMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveUnixCredentialsMessageMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveUnixCredentialsMessageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveUnixCredentialsMessageMethod "getCredentials" o = UnixCredentialsMessageGetCredentialsMethodInfo
ResolveUnixCredentialsMessageMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveUnixCredentialsMessageMethod "getLevel" o = Gio.SocketControlMessage.SocketControlMessageGetLevelMethodInfo
ResolveUnixCredentialsMessageMethod "getMsgType" o = Gio.SocketControlMessage.SocketControlMessageGetMsgTypeMethodInfo
ResolveUnixCredentialsMessageMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveUnixCredentialsMessageMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveUnixCredentialsMessageMethod "getSize" o = Gio.SocketControlMessage.SocketControlMessageGetSizeMethodInfo
ResolveUnixCredentialsMessageMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveUnixCredentialsMessageMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveUnixCredentialsMessageMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveUnixCredentialsMessageMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveUnixCredentialsMessageMethod t UnixCredentialsMessage, O.MethodInfo info UnixCredentialsMessage p) => OL.IsLabel t (UnixCredentialsMessage -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
getUnixCredentialsMessageCredentials :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m Gio.Credentials.Credentials
getUnixCredentialsMessageCredentials obj = liftIO $ checkUnexpectedNothing "getUnixCredentialsMessageCredentials" $ B.Properties.getObjectPropertyObject obj "credentials" Gio.Credentials.Credentials
constructUnixCredentialsMessageCredentials :: (IsUnixCredentialsMessage o, Gio.Credentials.IsCredentials a) => a -> IO (GValueConstruct o)
constructUnixCredentialsMessageCredentials val = B.Properties.constructObjectPropertyObject "credentials" (Just val)
#if ENABLE_OVERLOADING
data UnixCredentialsMessageCredentialsPropertyInfo
instance AttrInfo UnixCredentialsMessageCredentialsPropertyInfo where
type AttrAllowedOps UnixCredentialsMessageCredentialsPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint UnixCredentialsMessageCredentialsPropertyInfo = Gio.Credentials.IsCredentials
type AttrBaseTypeConstraint UnixCredentialsMessageCredentialsPropertyInfo = IsUnixCredentialsMessage
type AttrGetType UnixCredentialsMessageCredentialsPropertyInfo = Gio.Credentials.Credentials
type AttrLabel UnixCredentialsMessageCredentialsPropertyInfo = "credentials"
type AttrOrigin UnixCredentialsMessageCredentialsPropertyInfo = UnixCredentialsMessage
attrGet _ = getUnixCredentialsMessageCredentials
attrSet _ = undefined
attrConstruct _ = constructUnixCredentialsMessageCredentials
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList UnixCredentialsMessage
type instance O.AttributeList UnixCredentialsMessage = UnixCredentialsMessageAttributeList
type UnixCredentialsMessageAttributeList = ('[ '("credentials", UnixCredentialsMessageCredentialsPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
unixCredentialsMessageCredentials :: AttrLabelProxy "credentials"
unixCredentialsMessageCredentials = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList UnixCredentialsMessage = UnixCredentialsMessageSignalList
type UnixCredentialsMessageSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_unix_credentials_message_new" g_unix_credentials_message_new ::
IO (Ptr UnixCredentialsMessage)
unixCredentialsMessageNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m UnixCredentialsMessage
unixCredentialsMessageNew = liftIO $ do
result <- g_unix_credentials_message_new
checkUnexpectedReturnNULL "unixCredentialsMessageNew" result
result' <- (wrapObject UnixCredentialsMessage) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_unix_credentials_message_new_with_credentials" g_unix_credentials_message_new_with_credentials ::
Ptr Gio.Credentials.Credentials ->
IO (Ptr UnixCredentialsMessage)
unixCredentialsMessageNewWithCredentials ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Credentials.IsCredentials a) =>
a
-> m UnixCredentialsMessage
unixCredentialsMessageNewWithCredentials credentials = liftIO $ do
credentials' <- unsafeManagedPtrCastPtr credentials
result <- g_unix_credentials_message_new_with_credentials credentials'
checkUnexpectedReturnNULL "unixCredentialsMessageNewWithCredentials" result
result' <- (wrapObject UnixCredentialsMessage) result
touchManagedPtr credentials
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_unix_credentials_message_get_credentials" g_unix_credentials_message_get_credentials ::
Ptr UnixCredentialsMessage ->
IO (Ptr Gio.Credentials.Credentials)
unixCredentialsMessageGetCredentials ::
(B.CallStack.HasCallStack, MonadIO m, IsUnixCredentialsMessage a) =>
a
-> m Gio.Credentials.Credentials
unixCredentialsMessageGetCredentials message = liftIO $ do
message' <- unsafeManagedPtrCastPtr message
result <- g_unix_credentials_message_get_credentials message'
checkUnexpectedReturnNULL "unixCredentialsMessageGetCredentials" result
result' <- (newObject Gio.Credentials.Credentials) result
touchManagedPtr message
return result'
#if ENABLE_OVERLOADING
data UnixCredentialsMessageGetCredentialsMethodInfo
instance (signature ~ (m Gio.Credentials.Credentials), MonadIO m, IsUnixCredentialsMessage a) => O.MethodInfo UnixCredentialsMessageGetCredentialsMethodInfo a signature where
overloadedMethod _ = unixCredentialsMessageGetCredentials
#endif
foreign import ccall "g_unix_credentials_message_is_supported" g_unix_credentials_message_is_supported ::
IO CInt
unixCredentialsMessageIsSupported ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Bool
unixCredentialsMessageIsSupported = liftIO $ do
result <- g_unix_credentials_message_is_supported
let result' = (/= 0) result
return result'
#if ENABLE_OVERLOADING
#endif