libssh2-0.2.0.8: FFI bindings to libssh2 SSH2 client library (http://libssh2.org/)
Safe HaskellNone
LanguageHaskell2010

Network.SSH.Client.LibSSH2.Errors

Synopsis

Types

data ErrorCode Source #

Error codes returned by libssh2.

Instances

Instances details
Enum ErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Eq ErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Data ErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ErrorCode -> c ErrorCode #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ErrorCode #

toConstr :: ErrorCode -> Constr #

dataTypeOf :: ErrorCode -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ErrorCode) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ErrorCode) #

gmapT :: (forall b. Data b => b -> b) -> ErrorCode -> ErrorCode #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ErrorCode -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ErrorCode -> r #

gmapQ :: (forall d. Data d => d -> u) -> ErrorCode -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ErrorCode -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ErrorCode -> m ErrorCode #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ErrorCode -> m ErrorCode #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ErrorCode -> m ErrorCode #

Ord ErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Show ErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Exception ErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

data SftpErrorCode Source #

Sftp error code returning from libssh2

Instances

Instances details
Enum SftpErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Eq SftpErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Data SftpErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SftpErrorCode -> c SftpErrorCode #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SftpErrorCode #

toConstr :: SftpErrorCode -> Constr #

dataTypeOf :: SftpErrorCode -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SftpErrorCode) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SftpErrorCode) #

gmapT :: (forall b. Data b => b -> b) -> SftpErrorCode -> SftpErrorCode #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SftpErrorCode -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SftpErrorCode -> r #

gmapQ :: (forall d. Data d => d -> u) -> SftpErrorCode -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SftpErrorCode -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SftpErrorCode -> m SftpErrorCode #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SftpErrorCode -> m SftpErrorCode #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SftpErrorCode -> m SftpErrorCode #

Ord SftpErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Show SftpErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Exception SftpErrorCode Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

data NULL_POINTER Source #

Exception to throw when null pointer received from libssh2.

Instances

Instances details
Eq NULL_POINTER Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Data NULL_POINTER Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NULL_POINTER -> c NULL_POINTER #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NULL_POINTER #

toConstr :: NULL_POINTER -> Constr #

dataTypeOf :: NULL_POINTER -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NULL_POINTER) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NULL_POINTER) #

gmapT :: (forall b. Data b => b -> b) -> NULL_POINTER -> NULL_POINTER #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NULL_POINTER -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NULL_POINTER -> r #

gmapQ :: (forall d. Data d => d -> u) -> NULL_POINTER -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NULL_POINTER -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NULL_POINTER -> m NULL_POINTER #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NULL_POINTER -> m NULL_POINTER #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NULL_POINTER -> m NULL_POINTER #

Show NULL_POINTER Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Exception NULL_POINTER Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Utilities

class IntResult a where Source #

Methods

intResult :: a -> Int Source #

Instances

Instances details
IntResult Int Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

intResult :: Int -> Int Source #

IntResult CInt Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

intResult :: CInt -> Int Source #

IntResult CLong Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

intResult :: CLong -> Int Source #

IntResult CLLong Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

intResult :: CLLong -> Int Source #

IntResult (Int, a) Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

intResult :: (Int, a) -> Int Source #

IntResult (Int, a, b) Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

intResult :: (Int, a, b) -> Int Source #

IntResult (Int, a, b, c) Source # 
Instance details

Defined in Network.SSH.Client.LibSSH2.Errors

Methods

intResult :: (Int, a, b, c) -> Int Source #

Functions

getLastError :: Session -> IO (Int, String) Source #

Get last error information.

getLastSftpError :: Sftp -> IO Int Source #

Get last sftp related error.

handleInt :: (IntResult a, SshCtx ctx) => Maybe ctx -> IO a -> IO a Source #

Throw an exception if negative value passed, or return unchanged value.

handleNullPtr :: SshCtx c => Maybe c -> (Ptr () -> IO a) -> IO (Ptr ()) -> IO a Source #

Throw an exception if null pointer passed, or return it casted to right type.

blockedDirections :: Session -> IO [Direction] Source #

Get currently blocked directions

threadWaitSession :: SshCtx ctx => Maybe ctx -> IO () Source #