Jump to content


Photo

Is it possible to develop a plugin part in C++?


  • Please log in to reply
18 replies to this topic

#1 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 13 April 2016 - 14:01

Hello,

I'm developing a plugin using the enigma2 python API we all know, I need to call functions that communicate with my remote server but I don't want the end user to know how I create the token to get info from the remote server. So i was thinking to code this part in c++ so that it can compiled and it's not clear like with python.

 

Would that be possible?



Re: Is it possible to develop a plugin part in C++? #2 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 13 April 2016 - 17:34

You can create a c library which you can call from Python. Like this:
https://github.com/o...branding-module
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Is it possible to develop a plugin part in C++? #3 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 16 April 2016 - 13:38

You can create a c library which you can call from Python. Like this:
https://github.com/o...branding-module

 

Hi

this needs to be installed on decoders?



Re: Is it possible to develop a plugin part in C++? #4 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 16 April 2016 - 14:51

It's an example how to build a c++ library which can be used from python. So don't install it. Just adapt the code and build your own library.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Is it possible to develop a plugin part in C++? #5 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 21 April 2016 - 18:13

I browsed the plugin but I honestly didn't get how C and python interact. 



Re: Is it possible to develop a plugin part in C++? #6 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 21 April 2016 - 18:21

Look only at this part:
https://github.com/o...BoxBranding/lib

The c code is in boxbranding.c. In _boxbranding.c is the interface to python. And test.py is only an example to show how to access the lib from python.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Is it possible to develop a plugin part in C++? #7 LraiZer

  • Senior Member
  • 101 posts

+19
Neutral

Posted 21 April 2016 - 21:52

Maybe also look here at a plugin example of interaction with dvbreader C code lib and python reference to use dvbreader functions?

https://github.com/o...uquetsMaker/lib

https://github.com/o...r/dvbscanner.py



Re: Is it possible to develop a plugin part in C++? #8 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 22 April 2016 - 09:00

Hello,
I'm developing a plugin using the enigma2 python API we all know, I need to call functions that communicate with my remote server but I don't want the end user to know how I create the token to get info from the remote server. So i was thinking to code this part in c++ so that it can compiled and it's not clear like with python.
 
Would that be possible?


Just keep in mind that in order to be compatible with OpenPLi GPLv2 licensing, you'll have to provide the source code. You can do on your own box whatever you please, of course, that's the whole purpose of the copyleft licensing, but you won't be allowing your plugin to be distributed on GPLv2 images like OpenPLi and all its derivatives.

Regardless of licensing, there are now about 4 different CPU types, so you'll have to provide source code or lots of binaries anyway.

If you just want to protect your server, how about just setting up a user account system, so that users have to register before they can use it, and you can easily lock out the script kiddies.
Real musicians never die - they just decompose

Re: Is it possible to develop a plugin part in C++? #9 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 24 April 2016 - 23:09

Hey I think that's what I'll do, I'll move everything to the server side.

I'm having problems with development... am I missing something or there's no documentation for enigma and the skin? I mean how do I know how to interact with the interface and user action? All I could find was the python code that has comments but that's all.

Edited by sandro87, 24 April 2016 - 23:09.


Re: Is it possible to develop a plugin part in C++? #10 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 25 April 2016 - 19:40

Any help?



Re: Is it possible to develop a plugin part in C++? #11 pcd

  • Senior Member
  • 759 posts

+88
Good

Posted 26 April 2016 - 06:33

The easiest way is to first build your own image. Inside the build you will have builds of enigma2 plugins. Then look in the source of say Vlcplayer where you will see code for servicets. In the built plugin - servicets becomes servicets.so. Just modify the servicets code (c++), rebuild the plugin, and you will have your own .so.


Edited by pcd, 26 April 2016 - 06:34.


Re: Is it possible to develop a plugin part in C++? #12 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 26 April 2016 - 08:26

I'm having problems with development... am I missing something or there's no documentation for enigma and the skin? I mean how do I know how to interact with the interface and user action? All I could find was the python code that has comments but that's all.


Yeah. Basically everyone just takes an existing plugin as example and works from there.

Many complain about lack of documentation, but apparently the complainers don't care enough to write down what they found out once they get things going...
Real musicians never die - they just decompose

Re: Is it possible to develop a plugin part in C++? #13 LraiZer

  • Senior Member
  • 101 posts

+19
Neutral

Posted 26 April 2016 - 14:19

Follow this enigma2 plugin tutorial step by step, while also reading all docs and pdf included. You will learn more by starting with a blank file for each example and manually writing each plugin example from scratch yourself as you read each step, rather than simply looking at the example code.

Attached Files



Re: Is it possible to develop a plugin part in C++? #14 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 27 April 2016 - 13:19

Thanks guys at least I know I was not crazy not able to find any doc on this site.



Re: Is it possible to develop a plugin part in C++? #15 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 27 April 2016 - 19:37

 

I'm having problems with development... am I missing something or there's no documentation for enigma and the skin? I mean how do I know how to interact with the interface and user action? All I could find was the python code that has comments but that's all.


Yeah. Basically everyone just takes an existing plugin as example and works from there.

Many complain about lack of documentation, but apparently the complainers don't care enough to write down what they found out once they get things going...

 

Shouldn't this be something openpli should take care of? I mean they created this software and the API so... They should provide info for developers. Don't you think?



Re: Is it possible to develop a plugin part in C++? #16 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 27 April 2016 - 21:09

@

 

 

 

I'm having problems with development... am I missing something or there's no documentation for enigma and the skin? I mean how do I know how to interact with the interface and user action? All I could find was the python code that has comments but that's all.


Yeah. Basically everyone just takes an existing plugin as example and works from there.

Many complain about lack of documentation, but apparently the complainers don't care enough to write down what they found out once they get things going...

 

Shouldn't this be something openpli should take care of? I mean they created this software and the API so... They should provide info for developers. Don't you think?

 

 

@sandro87

It is not true. OpenPli  make own distribution of the E2 but E2 has not been designed by OpenPli.

 

When persons make something as Open Source then they not need do anything  thay CAN but they do not have to.

 

Regards,

SSS


Edited by samsamsam, 27 April 2016 - 21:12.


Re: Is it possible to develop a plugin part in C++? #17 sandro87

  • Member
  • 10 posts

0
Neutral

Posted 27 April 2016 - 22:45

@

 

 

 

I'm having problems with development... am I missing something or there's no documentation for enigma and the skin? I mean how do I know how to interact with the interface and user action? All I could find was the python code that has comments but that's all.


Yeah. Basically everyone just takes an existing plugin as example and works from there.

Many complain about lack of documentation, but apparently the complainers don't care enough to write down what they found out once they get things going...

 

Shouldn't this be something openpli should take care of? I mean they created this software and the API so... They should provide info for developers. Don't you think?

 

 

@sandro87

It is not true. OpenPli  make own distribution of the E2 but E2 has not been designed by OpenPli.

 

When persons make something as Open Source then they not need do anything  thay CAN but they do not have to.

 

Regards,

SSS

Of course they don't have to but it's usually good practice especially if you create a way to make extensions... it seems counter productive to not give out a documentation. So who makes E2?



Re: Is it possible to develop a plugin part in C++? #18 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 28 April 2016 - 06:33

It's a joint effort. Anyone can contribute, that includes you.
Real musicians never die - they just decompose

Re: Is it possible to develop a plugin part in C++? #19 pcd

  • Senior Member
  • 759 posts

+88
Good

Posted 1 May 2016 - 08:59

@sandros87

 

Nobody can make a how-to for enigma2 - too many optiona and variables possible. If you want to learn about for instance plugins, look into the code of a simple plugin and try to learn the basic steps. Do some trial and error to change something. Everbody has to learn from the beginning. 




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users