> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_30aba3d9bf6279a25d84abe4015711f7/dir_f7a957c8f5c8e80b5a8d4b37f193d419/dir_e8da2933844aa72825eccee783cf08f3/ftp__curl_8c.md).

# ftp\_curl.c

[Functions](#func-members)

`#include "EventScheduler.h"` `#include "VHQDebug.h"` `#include "VHQDownloader.h"` `#include "VHQIo.h"` `#include "VHQIoInternals.h"` `#include "VHQSecurity.h"` `#include "VHQPosIPC.h"` `#include "VHQConfig.h"` `#include "VHQFileNames.h"` `#include "VHQUtils.h"` `#include "VHQcURLconfiguration.h"` `#include <sys/stat.h>` `#include <time.h>` `#include "ComIntf.h"`

Include dependency graph for ftp\_curl.c:

![](/files/CB14AlGDEBOasj41rTn0)

|                |                                                                                                                                                                                                                                                                                                                                   |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Functions      |                                                                                                                                                                                                                                                                                                                                   |
| bool           | [IsSSLOption](#a57e6bb8ca1c78a40939b7a58863feefa) (char \*pszUrl)                                                                                                                                                                                                                                                                 |
| bool           | [GenerateFileTransferCredentials](#a6a95761e6d904510a71a1c669575b743) (char \*userpass\_str, int userpass\_str\_len)                                                                                                                                                                                                              |
| bool           | [VHQHTTPException](#a0f6ebf07478447be27fe208ebb5f4d23) (int inCode)                                                                                                                                                                                                                                                               |
| vhq\_result\_t | [DownloadFileWorker](#a01aefd93b7b4b6c8a756c13a8bfd0071) (dl\_file\_method\_t eMethod, char \*pszDest, char \*pszUrl, dl\_file\_hash\_algo\_t eHashAlgo, char \*pszHash, bool bMaintDl, uint32 filesize, event\_set\_id\_t event\_set\_id, event\_id\_t event\_id, uint32 \*dl\_duration, uint32 \*dl\_attempts, bool dl\_notify) |

### DetailedDescription <a href="#detailed-description" id="detailed-description"></a>

Download file given URL

### FunctionDocumentation <a href="#function-documentation" id="function-documentation"></a>

### DownloadFileWorker() <a href="#a01aefd93b7b4b6c8a756c13a8bfd0071" id="a01aefd93b7b4b6c8a756c13a8bfd0071"></a>

vhq\_result\_t DownloadFileWorker

This function calls function to download a file from server and finds the time taken for the attempt.

**Parameters**

\[in] **eMethod** = file download method \[out] **pszDest** = partial download file name(tmp) \[in] **pszUser** = user \[in] **pszPw** = PW \[in] **pszUrl** = URL \[in] **eHashAlgo** = hash algorithm \[in] **pszHash** = received hash value from server. \[in] **bMaintDl** = TRUE, if maintenance download \[in] **filesize** = size of file to download \[in] **event\_set\_id** = event set id of event \[in] **event\_id** = event ID of event \[out] **dl\_duration** = download duration \[out] **dl\_attempts** = number of download attempts \[in] **dl\_notify** = Download notifications

#### Returns

vhq\_result\_t VHQ\_SUCCESS, if success

### GenerateFileTransferCredentials() <a href="#a6a95761e6d904510a71a1c669575b743" id="a6a95761e6d904510a71a1c669575b743"></a>

bool GenerateFileTransferCredentials

This function provides the signature details for file transfer

**Parameters**

\[in] **userpass\_str** = signature details stored to this buffer \[in] **userpass\_str\_len** = size of buffer.

#### Returns

TRUE, if success; FALSE, otherwise

### IsSSLOption() <a href="#a57e6bb8ca1c78a40939b7a58863feefa" id="a57e6bb8ca1c78a40939b7a58863feefa"></a>

bool IsSSLOption

### VHQHTTPException() <a href="#a0f6ebf07478447be27fe208ebb5f4d23" id="a0f6ebf07478447be27fe208ebb5f4d23"></a>

bool VHQHTTPException


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_30aba3d9bf6279a25d84abe4015711f7/dir_f7a957c8f5c8e80b5a8d4b37f193d419/dir_e8da2933844aa72825eccee783cf08f3/ftp__curl_8c.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
