Enigma1 THE BIBLE - Application Structure Overview

Application Structure Overview

/*
+--------------------------------------------------------------------------
| The Bible Enigma1 Tutorial
| ========================================
| By: Bacicciosat aka Meo aka Luponero
|
| Enigma 1 API GUI tutorial whith Sources Code and Comments
| (c) august 2006 by Meo
|
+---------------------------------------------------------------------------
*/

Warning: You cannot modify, redistribute or publish this tutorial in any way without header and Bacicciosat credits.

2. Application Structure Overview

Enigma Applications use C++ language.
Enigma Applications can run into your Dreambox as extensions named plugins.

Every plugin is composed by.
1) a .cfg file (a simple text file)
2) a .so compiled and executable file (the real apllication)

Warning: These files need to have the same name. The difference is only in the extension.
As for Example: demo.so and demo.cfg

----------------


1) About .cfg file:


The .cfg file contains informations about our application.
This is a standard .cfg file that we will use for our examples.
The only part of .cfg file you need to modify is the line "name".
This line contains the name of your application that will be shown in the Dreambox Plugins List.
Code:
name=Demo Enigma Bible
desc=
depend=
type=2
needfb=0
needrc=0
needlcd=0
enigmaplugin=1

2) About .so file:


The .so file is the real application. It is the compiled source.
The source file is a C++ file and have the .cpp extension.
When we will compile the source file we will have the .so file that we can upload on your Dreambox.
So, to create a new Enigma application (plugn) we need a .cfg file a .ccp file and a makefile to compile the .cpp source file.
All these files are provided in this tutorial. You can study, modify and compile Enigma applications using these demo files.


3) An overview to source code application:

As described below our code application is contained in a source file (.cpp) that we will compile to obtain the .so file.
This source file is a normal C++ source file that contains the C and C++ libraries and the Enigma libraries and API.
To illustrate an Enigma source file we can divide it in 4 main sections:
a) Include files (Libraries needed by our code. We can use: C libraries, C++ libraries, Enigma libraries)
b) Class and Functions declarations (We have to declare the classes and the functions we will use in our code)
c) The application entry point (The function that Enigma will call to start the execution of our application)
d) The code (We will call Enigma Api and functions in normal C++ code to manage Enigma Graphical Objects).

Ok we are now ready to start our first Enigma application.
To be continued....
發佈了19 篇原創文章 · 獲贊 0 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章