General Information

<< Back to the Development Kit User Manual

Development Kit is a library for creating clients’ applications.

The Development Kit library provides wide functionality: one can get the info about the user’s account, as well as about the nodes and available USB devices, manage local USB devices and connect to shared USB devices remotely.

With the Development Kit library one can also add a computer to the existing account, or disconnect any computer from the account.

The Development Kit library consists of the set of DLLs (32- and 64-bit) and header files.

The Development Kit library communicates with the Service installed on the computer for which it uses the same channel as used by the GUI application (flexihub-gui.exe) to communicate with the Service.

The Service can interact with only one client at a time.

So in case FlexiHub’s GUI is launched, the Development Kit library cannot get access to the Service, and vice versa.
In this case the application will get the corresponding message.

The info about the system status (connection to the server, availability of the drivers, etc.), as well as the info about the local and all other nodes in the users’ accounts, is sent to the Development Kit library by the Service.

The system status and the list of devices are changed asynchronously, so to get the current info, the callback functions are used.

The application gets signals about the changes via events.

However, the application can get the current state of all computers and the devices in the account from the Development Kit library even without using callback & events system.

The application can send various commands via the Development Kit library to manage computers and devices. Since certain time is required to execute the command, the command result is received via callback & events system as well.

The Development Kit Files

Having unpacked the DevKit archive, you will find the DevKit catalog, which contains the following files and catalogs:

FlexiHub Devkit\
   |
   |   fhcld32.exe - 32-bit command-line utility example
   |   fhcld64.exe - 64-bit command-line utility example
   |   flexihubdk32.dll - 32-bit DevKit dll
   |   flexihubdk64.dll - 64-bit DevKit dll
   |
   +---C++examples\
      |
      |   devkit.sln               - solution file for Microsoft Visual Studio 2010 or higher
      |   flexihub_devkit.h        - header file for DevKit dll
      |   flexihub_devkit_consts.h - additional header for DevKit events and constants
      |   flexihubdk32.lib         - 32-bit import library file associated with flexihubdk32.dll
      |   flexihubdk64.lib         - 64-bit import library file associated with flexihubdk64.dll
      |
      +---cli      - command-line utility sources, as example how to use DevKit.
      |              You can modify the code to adapt it to your needs.
      |
      +---project  - project settings for Microsoft Visual Studio 2010 or higher
      |
      +---examples - set of simple C++ examples of DevKit dll usage;
      |              look at code to get the idea how different things work.
      |
      +---jsoncpp - C++ library to manipulate JSON data
                    (required to compile examples and command-line utility)

Link: C++ library to manipulate JSON data

 

Samples for Work with the DevKit Library

The “FlexiHub DevKit\C++examples\cli” catalog contains the source files for the command-line utility which works as the simple frontend for the DevKit library.

The code is written in C++ and requires Microsoft Visual Studio 2010 or later for compilation.

The files from theJsonCpp library code for work with JSON data from “FlexiHub DevKit\C++examples\jsoncpp” are used in “FlexiHub DevKit\C++examples\cli”, as well.

Additionally, you can find some simple samples of API DevKit dll usage in“FlexiHub DevKit\C++examples\examples”.

Command-Line Utility Description

The DevKit catalog contains the console command-line utilityfhcld32.exe (fhcld64.exe), which allows executing the above mentioned commands via the DevKit dll.

See detailed description of all subcommands in the “CLI Help” chapter.

<< Back to the Development Kit User Manual