LibreOffice: rtl/byteseq.h File Reference

LibreOffice LibreOffice 25.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
byteseq.h File Reference
`#include "sal/config.h"`
`#include "rtl/alloc.h"`
`#include "sal/saldllapi.h"`
`#include "sal/types.h"`

Go to the source code of this file.

## Classes
class | rtl::ByteSequence
| C++ class representing a SAL byte sequence. More...

## Namespaces
namespace | rtl

## Enumerations
enum | rtl::__ByteSequence_NoDefault { rtl::BYTESEQ_NODEFAULT = 0xcafe }
enum | rtl::__ByteSequence_NoAcquire { rtl::BYTESEQ_NOACQUIRE }

## Functions
SAL_DLLPUBLIC void | rtl_byte_sequence_reference2One (sal_Sequence **ppSequence) SAL_THROW_EXTERN_C()
| Assures that the reference count of the given byte sequence is one.
SAL_DLLPUBLIC void | rtl_byte_sequence_realloc (sal_Sequence **ppSequence, sal_Int32 nSize) SAL_THROW_EXTERN_C()
| Reallocates length of byte sequence.
SAL_DLLPUBLIC void | rtl_byte_sequence_acquire (sal_Sequence *pSequence) SAL_THROW_EXTERN_C()
| Acquires the byte sequence.
SAL_DLLPUBLIC void | rtl_byte_sequence_release (sal_Sequence *pSequence) SAL_THROW_EXTERN_C()
| Releases the byte sequence.
SAL_DLLPUBLIC void | rtl_byte_sequence_construct (sal_Sequence **ppSequence, sal_Int32 nLength) SAL_THROW_EXTERN_C()
| Constructs a bytes sequence with length nLength.
SAL_DLLPUBLIC void | rtl_byte_sequence_constructNoDefault (sal_Sequence **ppSequence, sal_Int32 nLength) SAL_THROW_EXTERN_C()
| Constructs a bytes sequence with length nLength.
SAL_DLLPUBLIC void | rtl_byte_sequence_constructFromArray (sal_Sequence **ppSequence, const sal_Int8 *pData, sal_Int32 nLength) SAL_THROW_EXTERN_C()
| Constructs a byte sequence with length nLength and copies nLength bytes from pData.
SAL_DLLPUBLIC void | rtl_byte_sequence_assign (sal_Sequence **ppSequence, sal_Sequence *pSequence) SAL_THROW_EXTERN_C()
| Assigns the byte sequence pSequence to *ppSequence.
SAL_DLLPUBLIC sal_Bool | rtl_byte_sequence_equals (sal_Sequence *pSequence1, sal_Sequence *pSequence2) SAL_THROW_EXTERN_C()
| Compares two byte sequences.
SAL_DLLPUBLIC const sal_Int8 * | rtl_byte_sequence_getConstArray (sal_Sequence *pSequence) SAL_THROW_EXTERN_C()
| Returns the data array pointer of the sequence.
SAL_DLLPUBLIC sal_Int32 | rtl_byte_sequence_getLength (sal_Sequence *pSequence) SAL_THROW_EXTERN_C()
| Returns the length of the sequence.

## Function Documentation

## ◆ rtl_byte_sequence_acquire()

SAL_DLLPUBLIC void rtl_byte_sequence_acquire | ( | sal_Sequence * | pSequence | ) |

Acquires the byte sequence.

Parameters

  pSequence | sequence, that is to be acquired

## ◆ rtl_byte_sequence_assign()

SAL_DLLPUBLIC void rtl_byte_sequence_assign | ( | sal_Sequence ** | ppSequence,
|  | sal_Sequence * | pSequence )

Assigns the byte sequence pSequence to *ppSequence.

Parameters

  ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence references pSequence
  pSequence | the source sequence

## ◆ rtl_byte_sequence_construct()

SAL_DLLPUBLIC void rtl_byte_sequence_construct | ( | sal_Sequence ** | ppSequence,
|  | sal_Int32 | nLength )

Constructs a bytes sequence with length nLength.

All bytes are set to zero.

Parameters

  ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence contains the newly constructed sequence
  nLength | length of new sequence

## ◆ rtl_byte_sequence_constructFromArray()

SAL_DLLPUBLIC void rtl_byte_sequence_constructFromArray | ( | sal_Sequence ** | ppSequence,
|  | const sal_Int8 * | pData,
|  | sal_Int32 | nLength )

Constructs a byte sequence with length nLength and copies nLength bytes from pData.

Parameters

  ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence contains the newly constructed sequence
  pData | initial data
  nLength | length of new sequence

## ◆ rtl_byte_sequence_constructNoDefault()

SAL_DLLPUBLIC void rtl_byte_sequence_constructNoDefault | ( | sal_Sequence ** | ppSequence,
|  | sal_Int32 | nLength )

Constructs a bytes sequence with length nLength.

The data is not initialized.

Parameters

  ppSequence | inout sequence; on entry *ppSequence may be null, otherwise it is released; after the call, *ppSequence contains the newly constructed sequence
  nLength | length of new sequence

## ◆ rtl_byte_sequence_equals()

SAL_DLLPUBLIC sal_Bool rtl_byte_sequence_equals | ( | sal_Sequence * | pSequence1,
|  | sal_Sequence * | pSequence2 )

Compares two byte sequences.

Returns
  true, if the data within the sequences are identical; false otherwise

## ◆ rtl_byte_sequence_getConstArray()

SAL_DLLPUBLIC const sal_Int8 * rtl_byte_sequence_getConstArray | ( | sal_Sequence * | pSequence | ) |

Returns the data array pointer of the sequence.

Returns
  read-pointer to the data array of the sequence. If rtl_byte_sequence_reference2One() has been called before, the pointer may be casted to a non const pointer and the sequence may be modified

## ◆ rtl_byte_sequence_getLength()

SAL_DLLPUBLIC sal_Int32 rtl_byte_sequence_getLength | ( | sal_Sequence * | pSequence | ) |

Returns the length of the sequence.

Parameters

  pSequence | sequence handle

Returns
  length of the sequence

## ◆ rtl_byte_sequence_realloc()

SAL_DLLPUBLIC void rtl_byte_sequence_realloc | ( | sal_Sequence ** | ppSequence,
|  | sal_Int32 | nSize )

Reallocates length of byte sequence.

Parameters

  ppSequence | sequence
  nSize | new size of sequence

## ◆ rtl_byte_sequence_reference2One()

SAL_DLLPUBLIC void rtl_byte_sequence_reference2One | ( | sal_Sequence ** | ppSequence | ) |

Assures that the reference count of the given byte sequence is one.

Otherwise a new copy of the sequence is created with a reference count of one.

Parameters

  ppSequence | sequence

## ◆ rtl_byte_sequence_release()

SAL_DLLPUBLIC void rtl_byte_sequence_release | ( | sal_Sequence * | pSequence | ) |

Releases the byte sequence.

If the refcount drops to zero, the sequence is freed.

Parameters

  pSequence | sequence, that is to be released; invalid after call