\ API
API
THE FOLLOWING API IS WORK IN PROGRESS AND SUBJECT TO CHANGE.

The YLoader API consists of several functions exported by the yloader.dll, and whose C prototypes are declared in yloader.h. These APIs can be used in applications developed in C, C++, Visual Basic, Excel or any other languages and environments that allow direct dll calls.
 

unsigned int create( unsigned int mode );
bool start( unsigned int downloaderId, int mode );
bool isRunning( unsigned int downloaderId, bool* isRunning );
bool getLastError( char* error, unsigned int errorMessageLength );
bool startSession( unsigned int downloaderId, bool sync );
�bool isSessionActive( unsigned int downloaderId, bool* isSessionActive );
�bool hasHadSession( unsigned int downloaderId, bool* hasHadSession );
bool setSymbolsFileName( unsigned int downloaderId, const char* symbolsFileName );
bool setDataPath( unsigned int downloaderId, const char* dataPath );
bool setDateRange( unsigned int downloaderId, const char* startDate, const char* endDate );
bool setStartDate( unsigned int downloaderId, const char* startDate );
bool setEndDate( unsigned int downloaderId, const char* endDate );
bool setDataSource( unsigned int downloaderId, unsigned int dataSource );
bool setDataSourcePlugin( unsigned int downloaderId, const char* dataSourcePlugin );
  • Description: sets the data source plugin.
  • Arguments:
    • unsigned int downloaderId - the downloader id
    • const char* dataSourcePlugin - the address of a string containing the first characters of the plugin short name or id. This string is case insensitive. The call will fail if there is no plugin matching the string, or if there are two or more plug-ins matching the string.
  • Return value: true in case of success, false in case of failure. Call getLastError to get more information about a failure.
  • Ex:
    bool success = setDataSource( downloaderId, "Y" ); // will set the Yahoo plugin
    bool success = setDataSource( downloaderId, "yahoo" ); // will set the Yahoo plugin
    bool success = setDataSource( downloaderId, "goo" ); // will set the Google plugin
    bool success = setDataSource( downloaderId, "4389DD" ); // will set the Google plugin
    // whose id is 4389DDF8-91D8-4c8b-894C-60E033AE83C7

bool loadSettings( unsigned int downloaderId, const char* settingsName );

bool setAllAvailable( unsigned int downloaderId, bool allAvailable );
bool setUpdate( unsigned int downloaderId, bool update );
bool setAdjust( unsigned int downloaderId, bool adjust );
bool setValidatePrices( unsigned int downloaderId, bool validate );
bool setPeriod( unsigned int downloaderId, unsigned int period );
bool setConnections( unsigned int downloaderId, unsigned int connections );
bool close( unsigned int downloaderId );
bool getLastError( char* error, unsigned int errorMessageLength );

Copyright © 2017 YLoader.com
http://www.yloader.com

info@yloader.com