-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use writeback to external io handler in transport_write if external io is in use logic fix implemented write handler for external io added support for external io mode into transport_read_pdu instead of duplicating it. added missed EOL in new file logic fix dropped unneeded 'else' WIP: making whole io switchable moved streampool related code to separate function implemented switchable Read implemented switchable write changes requested by akallabeth DataHandler inplementation should not be switched, it is intended to be used from external user use SSIZE_T type for signed size type improoved 'freerdp_set_transport_callbacks' logic a bit overwrite already allocated rdpIoUpdate instead of changing pointer to new one dropped noisy log messages
- Loading branch information
Gluzskiy Alexandr
committed
Jul 15, 2020
1 parent
369c232
commit 06017fb
Showing
9 changed files
with
288 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* FreeRDP: A Remote Desktop Protocol Implementation | ||
* IO Update Interface API | ||
* | ||
* Copyright 2020 Gluzskiy Alexandr <sss at sss dot chaoslab dot ru> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef FREERDP_UPDATE_IO_H | ||
#define FREERDP_UPDATE_IO_H | ||
|
||
#include <freerdp/types.h> | ||
|
||
typedef int (*pRead)(rdpContext* context, const uint8_t* buf, size_t buf_size); | ||
typedef int (*pWrite)(rdpContext* context, const uint8_t* buf, size_t buf_size); | ||
typedef int (*pDataHandler)(rdpContext* context, const uint8_t* buf, size_t buf_size); | ||
|
||
struct rdp_io_update | ||
{ | ||
rdpContext* context; /* 0 */ | ||
UINT32 paddingA[16 - 1]; /* 1 */ | ||
|
||
/* switchable read | ||
* used to read bytes from IO backend */ | ||
pWrite Read; /* 16 */ | ||
|
||
/* switchable write | ||
* used to write bytes to IO backend */ | ||
pWrite Write; /* 17 */ | ||
|
||
/* switchable data handler | ||
* used if IO backed doing internal polling and reading | ||
* and just passing recieved data to freerdp */ | ||
pDataHandler DataHandler; /* 18 */ | ||
UINT32 paddingB[32 - 19]; /* 19 */ | ||
}; | ||
typedef struct rdp_io_update rdpIoUpdate; | ||
|
||
|
||
#endif /* FREERDP_UPDATE_IO_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.