~arges/ubuntu/quantal/rsyslog/fix-lp1059592

« back to all changes in this revision

Viewing changes to runtime/stream.h

Tags: 5.7.3-1
* New upstream release.
* Upload to unstable.
* debian/patches/02-typo_fix_equation_sign.patch
  - Removed, merged upstream.
* debian/patches/03-atomic_operations.patch
  - Removed, merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        int64 iMaxFileSize;/* maximum size a file may grow to */
103
103
        int iMaxFiles;  /* maximum number of files if a circular mode is in use */
104
104
        int iFileNumDigits;/* min number of digits to use in file number (only in circular mode) */
105
 
        bool bDeleteOnClose; /* set to 1 to auto-delete on close -- be careful with that setting! */
 
105
        sbool bDeleteOnClose; /* set to 1 to auto-delete on close -- be careful with that setting! */
106
106
        int64 iCurrOffs;/* current offset */
107
107
        int64 *pUsrWCntr; /* NULL or a user-provided counter that receives the nbr of bytes written since the last CntrSet() */
108
108
        /* dynamic properties, valid only during file open, not to be persistet */
109
 
        bool bDisabled; /* should file no longer be written to? (currently set only if omfile file size limit fails) */
110
 
        bool bSync;     /* sync this file after every write? */
 
109
        sbool bDisabled; /* should file no longer be written to? (currently set only if omfile file size limit fails) */
 
110
        sbool bSync;    /* sync this file after every write? */
111
111
        size_t sIOBufSize;/* size of IO buffer */
112
112
        uchar *pszDir; /* Directory */
113
113
        int lenDir;
118
118
        size_t iBufPtrMax;      /* current max Ptr in Buffer (if partial read!) */
119
119
        size_t iBufPtr; /* pointer into current buffer */
120
120
        int iUngetC;    /* char set via UngetChar() call or -1 if none set */
121
 
        bool bInRecord; /* if 1, indicates that we are currently writing a not-yet complete record */
 
121
        sbool bInRecord;        /* if 1, indicates that we are currently writing a not-yet complete record */
122
122
        int iZipLevel;  /* zip level (0..9). If 0, zip is completely disabled */
123
123
        Bytef *pZipBuf;
124
124
        /* support for async flush procesing */
125
 
        bool bAsyncWrite;       /* do asynchronous writes (always if a flush interval is given) */
126
 
        bool bStopWriter;       /* shall writer thread terminate? */
127
 
        bool bDoTimedWait;      /* instruct writer thread to do a times wait to support flush timeouts */
 
125
        sbool bAsyncWrite;      /* do asynchronous writes (always if a flush interval is given) */
 
126
        sbool bStopWriter;      /* shall writer thread terminate? */
 
127
        sbool bDoTimedWait;     /* instruct writer thread to do a times wait to support flush timeouts */
128
128
        int iFlushInterval; /* flush in which interval - 0, no flushing */
129
129
        apc_id_t apcID;    /* id of current Apc request (used for cancelling) */
130
130
        pthread_mutex_t mut;/* mutex for flush in async mode */
143
143
        /* support for omfile size-limiting commands, special counters, NOT persisted! */
144
144
        off_t   iSizeLimit;     /* file size limit, 0 = no limit */
145
145
        uchar   *pszSizeLimitCmd;       /* command to carry out when size limit is reached */
146
 
        bool    bIsTTY;         /* is this a tty file? */
 
146
        sbool   bIsTTY;         /* is this a tty file? */
147
147
} strm_t;
148
148
 
149
149
 
156
156
        rsRetVal (*SetFileName)(strm_t *pThis, uchar *pszName, size_t iLenName);
157
157
        rsRetVal (*ReadChar)(strm_t *pThis, uchar *pC);
158
158
        rsRetVal (*UnreadChar)(strm_t *pThis, uchar c);
159
 
        rsRetVal (*ReadLine)(strm_t *pThis, cstr_t **ppCStr);
160
159
        rsRetVal (*SeekCurrOffs)(strm_t *pThis);
161
160
        rsRetVal (*Write)(strm_t *pThis, uchar *pBuf, size_t lenBuf);
162
161
        rsRetVal (*WriteChar)(strm_t *pThis, uchar c);
169
168
        rsRetVal (*Serialize)(strm_t *pThis, strm_t *pStrm);
170
169
        rsRetVal (*GetCurrOffset)(strm_t *pThis, int64 *pOffs);
171
170
        rsRetVal (*SetWCntr)(strm_t *pThis, number_t *pWCnt);
 
171
        rsRetVal (*Dup)(strm_t *pThis, strm_t **ppNew);
172
172
        INTERFACEpropSetMeth(strm, bDeleteOnClose, int);
173
173
        INTERFACEpropSetMeth(strm, iMaxFileSize, int);
174
174
        INTERFACEpropSetMeth(strm, iMaxFiles, int);
182
182
        INTERFACEpropSetMeth(strm, iSizeLimit, off_t);
183
183
        INTERFACEpropSetMeth(strm, iFlushInterval, int);
184
184
        INTERFACEpropSetMeth(strm, pszSizeLimitCmd, uchar*);
 
185
        /* v6 added */
 
186
        rsRetVal (*ReadLine)(strm_t *pThis, cstr_t **ppCStr, int mode);
185
187
ENDinterface(strm)
186
 
#define strmCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */
 
188
#define strmCURR_IF_VERSION 6 /* increment whenever you change the interface structure! */
187
189
 
188
190
 
189
191
/* prototypes */