| 1 | /* |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 15 | */ |
| 16 | |
| 17 | #ifndef D4LIB_H |
| 18 | |
| 19 | #define D4LIB_Hcxx . . $ `src/escputil/d4lib.h:19:9`! |
| 20 | |
| 21 | extern int debugD4cxx . . $ debugD4.; /* allow printout of debug informations */ |
| 22 | |
| 23 | extern int EnterIEEEcxx . . $ EnterIEEE(7864480464b09eea).(int fd); |
| 24 | extern int Initcxx . . $ Init(7864480464b09eea).(int fd); |
| 25 | extern int Exitcxx . . $ Exit(7864480464b09eea).(int fd); |
| 26 | extern int GetSocketIDcxx . . $ GetSocketID(95e580389a7cc305).(int fd, const char *serviceName); |
| 27 | extern int OpenChannelcxx . . $ OpenChannel(73d93e7fe8e2888d).(int fd, unsigned char sockId, int *sndSz, int *rcvSz); |
| 28 | extern int CloseChannelcxx . . $ CloseChannel(e01ba461194aa403).(int fd, unsigned char socketID); |
| 29 | extern int CreditRequestcxx . . $ CreditRequest(e01ba461194aa403).(int fd, unsigned char socketID); |
| 30 | extern int Creditcxx . . $ Credit(72efbd3f037c503a).(int fd, unsigned char socketID, int credit); |
| 31 | |
| 32 | /* convenience function */ |
| 33 | extern int SafeWritecxx . . $ SafeWrite(a67153b04d1848fa).(int fd, const void *data, int len); |
| 34 | extern int askForCreditcxx . . $ askForCredit(73d93e7fe8e2888d).(int fd, unsigned char socketID, int *sndSz, int *rcvSz); |
| 35 | extern int writeDatacxx . . $ writeData(222ea1eac8db07e).(int fd, unsigned char socketID, const unsigned char *buf, int len, int eoj); |
| 36 | extern int readDatacxx . . $ readData(8753d325580f1b2e).(int fd, unsigned char socketID, unsigned char *buf, int len); |
| 37 | extern int writeAndReadDatacxx . . $ writeAndReadData(bf0410ffa1fee343).(int fd, unsigned char socketID, |
| 38 | const unsigned char *cmd, int cmd_len, int eoj, |
| 39 | unsigned char *buf, int len, int *sndSz, int *rcvSz, |
| 40 | int (*test)(const unsigned char *buf)); |
| 41 | extern int readAnswercxx . . $ readAnswer(ffa0bf5da9ce00c6).(int fd, unsigned char *buf, int len, int allowExtra); |
| 42 | extern void flushDatacxx . . $ flushData(9633529ce3c4ff50).(int fd, unsigned char socketID); |
| 43 | extern void setDebugcxx . . $ setDebug(d4f767463ce0a6b3).(int debug); |
| 44 | |
| 45 | extern int d4WrTimeoutcxx . . $ d4WrTimeout.; |
| 46 | extern int d4RdTimeoutcxx . . $ d4RdTimeout.; |
| 47 | extern int ppidcxx . . $ ppid.; |
| 48 | |
| 49 | #if D4_DEBUG |
| 50 | #define DEBUG 1 |
| 51 | #endif |
| 52 | |
| 53 | #endif |