module Network.QPACK.Table (
DynamicTable,
newDynamicTableForEncoding,
newDynamicTableForDecoding,
getMaxNumOfEntries,
setBasePointToInsersionPoint,
getBasePoint,
getInsertionPoint,
getInsertionPointSTM,
checkInsertionPoint,
getLargestReference,
updateLargestReference,
insertEntryToEncoder,
insertEntryToDecoder,
toIndexedEntry,
RevIndex,
RevResult (..),
getRevIndex,
lookupRevIndex,
getHuffmanDecoder,
setDebugQPACK,
getDebugQPACK,
qpackDebug,
) where
import Control.Concurrent.STM
import Network.HPACK.Internal (Entry)
import Network.QPACK.Table.Dynamic
import Network.QPACK.Table.RevIndex
import Network.QPACK.Table.Static
import Network.QPACK.Types
toIndexedEntry :: DynamicTable -> HIndex -> STM Entry
toIndexedEntry :: DynamicTable -> HIndex -> STM Entry
toIndexedEntry DynamicTable
_ (SIndex AbsoluteIndex
ai) = Entry -> STM Entry
forall a. a -> STM a
forall (m :: * -> *) a. Monad m => a -> m a
return (Entry -> STM Entry) -> Entry -> STM Entry
forall a b. (a -> b) -> a -> b
$ AbsoluteIndex -> Entry
toStaticEntry AbsoluteIndex
ai
toIndexedEntry DynamicTable
dyntbl (DIndex AbsoluteIndex
ai) = DynamicTable -> AbsoluteIndex -> STM Entry
toDynamicEntry DynamicTable
dyntbl AbsoluteIndex
ai