|
@@ -153,9 +153,23 @@ static int downloader_xfer_deliver ( struct downloader *downloader,
|
153
|
153
|
return rc;
|
154
|
154
|
}
|
155
|
155
|
|
|
156
|
+/**
|
|
157
|
+ * Get underlying data transfer buffer
|
|
158
|
+ *
|
|
159
|
+ * @v downloader Downloader
|
|
160
|
+ * @ret xferbuf Data transfer buffer, or NULL on error
|
|
161
|
+ */
|
|
162
|
+static struct xfer_buffer *
|
|
163
|
+downloader_xfer_buffer ( struct downloader *downloader ) {
|
|
164
|
+
|
|
165
|
+ /* Provide direct access to underlying data transfer buffer */
|
|
166
|
+ return &downloader->buffer;
|
|
167
|
+}
|
|
168
|
+
|
156
|
169
|
/** Downloader data transfer interface operations */
|
157
|
170
|
static struct interface_operation downloader_xfer_operations[] = {
|
158
|
171
|
INTF_OP ( xfer_deliver, struct downloader *, downloader_xfer_deliver ),
|
|
172
|
+ INTF_OP ( xfer_buffer, struct downloader *, downloader_xfer_buffer ),
|
159
|
173
|
INTF_OP ( intf_close, struct downloader *, downloader_finished ),
|
160
|
174
|
};
|
161
|
175
|
|