debian-4.0.2: Modules for working with the Debian package system
Safe HaskellNone
LanguageHaskell98

Debian.Apt.Methods

Description

an interface for using the methods in varlibaptmethods

Synopsis

Documentation

withMethodPath :: FilePath -> (MethodHandle -> IO a) -> IO a Source #

withMethod - run |methodPath| bracketed with openMethod/closeMethod. |f| gets the open handle.

withMethodURI :: URI -> (MethodHandle -> IO a) -> IO a Source #

whichMethodPath :: URI -> IO (Maybe FilePath) Source #

whichMethodBinary - find the method executable associated with a URI throws an exception on failure

openMethod :: FilePath -> IO MethodHandle Source #

closeMethod :: MethodHandle -> IO ExitCode Source #

recvStatus :: MethodHandle -> IO Status Source #

sendCommand :: MethodHandle -> Command -> IO () Source #

getLastModified :: FilePath -> IO (Maybe UTCTime) Source #

simpleFetch :: [ConfigItem] -> URI -> FilePath -> Maybe UTCTime -> IO Bool Source #

fetch :: FetchCallbacks -> [ConfigItem] -> URI -> FilePath -> Maybe UTCTime -> IO Bool Source #

fetch a single item, show console output see also: getLastModified

data FetchCallbacks Source #

Constructors

FetchCallbacks 

Fields

emptyFetchCallbacks :: FetchCallbacks Source #

set of callbacks which do nothing. suitable for non-interactive usage. In the case authorization is required, no credentials will be supplied and the download should abort.

data Command Source #

Constructors

URIAcquire URI FilePath (Maybe UTCTime) 
Configuration [ConfigItem] 
AuthorizationCredentials Site User Password 
MediaChanged Media (Maybe Bool) 

Instances

Instances details
Eq Command Source # 
Instance details

Defined in Debian.Apt.Methods

Methods

(==) :: Command -> Command -> Bool

(/=) :: Command -> Command -> Bool

Show Command Source # 
Instance details

Defined in Debian.Apt.Methods

Methods

showsPrec :: Int -> Command -> ShowS

show :: Command -> String

showList :: [Command] -> ShowS

data Status Source #

Constructors

Capabilities 

Fields

LogMsg Message 
Status URI Message 
URIStart 

Fields

URIDone 

Fields

URIFailure 

Fields

GeneralFailure Message 
AuthorizationRequired Site 
MediaFailure Media Drive 

Instances

Instances details
Eq Status Source # 
Instance details

Defined in Debian.Apt.Methods

Methods

(==) :: Status -> Status -> Bool

(/=) :: Status -> Status -> Bool

Show Status Source # 
Instance details

Defined in Debian.Apt.Methods

Methods

showsPrec :: Int -> Status -> ShowS

show :: Status -> String

showList :: [Status] -> ShowS

type Message = String Source #

type Site = String Source #

type User = String Source #

type Password = String Source #

type Media = String Source #

type Drive = String Source #

type Header = (String, String) Source #

type ConfigItem = (String, String) Source #