src
cpp_exiftool
inc
ExifToolPipe.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: LicenseRef-ExiftoolCpp
2
// SPDX-FileCopyrightText: Copyright 2013-2019, Phil Harvey (philharvey66 at gmail.com)
3
4
//------------------------------------------------------------------------------
5
// File: ExifToolPipe.h
6
//
7
// Description: Piped output from exiftool application
8
//
9
// License: Copyright 2013-2019, Phil Harvey (philharvey66 at gmail.com)
10
//
11
// This is software, in whole or part, is free for use in
12
// non-commercial applications, provided that this copyright notice
13
// is retained. A licensing fee may be required for use in a
14
// commercial application.
15
//
16
// Created: 2013-11-23 - Phil Harvey
17
//------------------------------------------------------------------------------
18
#ifndef __EXIFTOOLPIPE_H__
19
#define __EXIFTOOLPIPE_H__
20
21
class
ExifToolPipe
22
{
23
public
:
24
ExifToolPipe
();
25
~ExifToolPipe
();
26
void
Init
(
int
fd,
int
pid,
int
initialSize);
27
int
Read
();
// read exiftool response
28
void
Free
();
// free buffer memory
29
void
Flush
();
// remove previous response from buffer
30
char
*
GetString
() {
return
(
mString
&&
mString
[0]) ?
mString
: (
char
*)0; }
31
int
GetStringLen
() {
return
mStringLen
; }
32
33
private
:
34
int
mFile
;
// read file descriptor
35
char
*
mBuff
;
// buffer pointer
36
int
mSize
;
// buffer size
37
int
mLen
;
// length of data in buffer
38
int
mPos
;
// current read position in buffer
39
int
mSearchPos
;
// current search position in buffer
40
int
mBlockSize
;
// initial buffer size
41
char
*
mString
;
// returned string from last Read()
42
int
mStringLen
;
// length of returned string
43
int
mPid
;
// process id for other side of the pipe
44
};
45
46
#endif // __EXIFTOOLPIPE_H__
ExifToolPipe::GetStringLen
int GetStringLen()
Definition:
ExifToolPipe.h:31
ExifToolPipe::Free
void Free()
ExifToolPipe::mPid
int mPid
Definition:
ExifToolPipe.h:43
ExifToolPipe
Definition:
ExifToolPipe.h:21
ExifToolPipe::mSearchPos
int mSearchPos
Definition:
ExifToolPipe.h:39
ExifToolPipe::GetString
char * GetString()
Definition:
ExifToolPipe.h:30
ExifToolPipe::mSize
int mSize
Definition:
ExifToolPipe.h:36
ExifToolPipe::Init
void Init(int fd, int pid, int initialSize)
ExifToolPipe::Flush
void Flush()
ExifToolPipe::mBlockSize
int mBlockSize
Definition:
ExifToolPipe.h:40
ExifToolPipe::ExifToolPipe
ExifToolPipe()
ExifToolPipe::mFile
int mFile
Definition:
ExifToolPipe.h:34
ExifToolPipe::~ExifToolPipe
~ExifToolPipe()
ExifToolPipe::mPos
int mPos
Definition:
ExifToolPipe.h:38
ExifToolPipe::mStringLen
int mStringLen
Definition:
ExifToolPipe.h:42
ExifToolPipe::mLen
int mLen
Definition:
ExifToolPipe.h:37
ExifToolPipe::Read
int Read()
ExifToolPipe::mString
char * mString
Definition:
ExifToolPipe.h:41
ExifToolPipe::mBuff
char * mBuff
Definition:
ExifToolPipe.h:35
exiftool_metadata_extractor
Author(s): Martin Pecka
autogenerated on Wed May 28 2025 02:07:28