maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   mbarcode (https://talk.maemo.org/showthread.php?t=34996)

lardman 2010-06-03 21:12

Re: mbarcode
 
dragly! ;)

There are some example plugins in the repo.

What does your application do?

dragly 2010-06-03 21:26

Re: mbarcode
 
Hmm? Yes? :)

lamle, there is currently no easy way to integrate the backend in mbarcode into an other application since we don't yet have an API made. This is one of the things we'll be looking at in the future, but I guess it's not going to happen very soon. I'm not even sure how such an API would be best made either (DBus? Separate library with access to the camera widget?).

I think the closest you'll get for now is to make a plugin that sends a DBus message to your application from mbarcode (look at Qt Dbus documentation). However, this would make your users have to open up your application alongside mbarcode, which might be tedious.

The other solution is to copy the VideoWidget, BarcodeDetector and decoder classes from mbarcode and implement these statically in your application. mbarcode is open source, after all :) The problem with this solution is that you will have to update your application with changes in mbarcode if you want to stay up to date with the latest bugfixes etc.

I'm afraid there are no code examples of what you are trying as of yet, but we'll probably make it easier to do in the future, when we've figured out how to set up an API for other applications.

lamle 2010-06-04 07:46

Re: mbarcode
 
hi,
Thank you for your reply.
I will try to copy the whole mbarcode project and modify it then.
However, I just wonder what is the use of those plugins such as https://garage.maemo.org/plugins/scm...=maemo-barcode
if I cannot embed it in other application???

tvogel 2010-06-04 08:02

Re: mbarcode
 
Well, it's just useful for mbarcode itself. It's an extensible interface for postprocessing scanned data. The qrcode plugin will process data scanned from a QR barcode. Pretty self-explanatory if you read the code.

If you want to process that data in another way, just provide another plugin.

What license is your project under?

lardman 2010-06-04 08:59

Re: mbarcode
 
lamle, what are you actually trying to do in your application? That's why I suggested making your app a plugin that runs within mBarcode.

dragly 2010-06-04 09:28

Re: mbarcode
 
Quote:

Originally Posted by tvogel (Post 699090)
What license is your project under?

That's a good point I forgot to mention;

mBarcode is licensed with the GPL license, meaning that you should release your application with the same (or compatible) license if you copy code from mBarcode. In other words, you should make your application open source as well, if it is not already GPL-licensed.

You don't have to worry about this before you release/distribute your application, however :) While developing before distribution you don't have to release the source code.

I hope this is not problematic for you, but if it is, just give us a heads up and I'm sure we could figure something out.

lamle 2010-06-04 11:44

Re: mbarcode
 
Hi,
Thank you for your reply.
I am doing this as my thesis so license is not my concern right now. I just need it to work.
My idea is to implement a nice search function for my application. User do not need to type anything but scan the barcode of the device or engine, the application will read the code and display relevant information of the engine. My pursuit is to use stacked window, when I push one button, it will open mbarcode window, after I have scanned the code and get the result, mbarcode window will close and return the main screen with the updated information of the engine.
I am trying to build that mbarcode application in my computer but it seems to have some unmet dependencies.
Can you pls help me where can I have the include for those gboolean, gchar or guint?????
I am just newbie in this environment so your help is really precious for me.
By the way, this PR1.2 is working great now.:)

lardman 2010-06-04 12:07

Re: mbarcode
 
Quote:

Originally Posted by lamle (Post 699396)
My idea is to implement a nice search function for my application. User do not need to type anything but scan the barcode of the device or engine, the application will read the code and display relevant information of the engine.

Hmm, that sounds interesting. What types of engines are we talking here? Many years ago I used to do stock taking holiday work for a couple of car dealerships. I wrote a program on my Psion 3a so that I could type the barcode number into the device + location and it would collate the info at the end of the day so I could keep the running db in sync (I wrote that system too).

Barcode readers were far too much money back then, but it would be interesting to go back and do it using camera + barcode recognition.

Anyway I digress, but basically if you tell us in more detail what you're doing, you may get people interested and willing to help.

On a more technical note, what type of barcode are we talking about here?

Quote:

Originally Posted by lamle (Post 699396)
My pursuit is to use stacked window, when I push one button, it will open mbarcode window, after I have scanned the code and get the result, mbarcode window will close and return the main screen with the updated information of the engine.

My feeling is that this would work quite well as a plugin to mBarcode, but if you really want a standalone app then fair enough.


Quote:

Originally Posted by lamle (Post 699396)
I am trying to build that mbarcode application in my computer but it seems to have some unmet dependencies.
Can you pls help me where can I have the include for those gboolean, gchar or guint?????

glib...

Quote:

Originally Posted by lamle (Post 699396)
I am just newbie in this environment so your help is really precious for me.

Which is again why I thought writing a plugin for mbarcode might make your life easier. There's worse ahead than working out what glib is don't worry ;)

lamle 2010-06-04 13:44

Re: mbarcode
 
Quote:

Originally Posted by lardman (Post 699436)
On a more technical note, what type of barcode are we talking about here?

barcode or QR code are both ok.

Quote:

Originally Posted by lardman (Post 699436)
My feeling is that this would work quite well as a plugin to mBarcode, but if you really want a standalone app then fair enough.
Which is again why I thought writing a plugin for mbarcode might make your life easier. There's worse ahead than working out what glib is don't worry ;)

You are right definitely. I am sure that I have include<glib-2.0/glib.h> in the header and in .pro file also. I dont know why the application cries about hundreds of error and I cant even find where is the log file of esbox.
error.txt

Can you explain a little bit about your idea implementing plugin for mbarcode? I really dont know how to achieve that yet.

dragly 2010-06-04 14:00

Re: mbarcode
 
Quote:

Originally Posted by lamle (Post 699566)
barcode or QR code are both ok.
You are right definitely. I am sure that I have include<glib-2.0/glib.h> in the header and in .pro file also. I dont know why the application cries about hundreds of error and I cant even find where is the log file of esbox.
error.txt

Can you explain a little bit about your idea implementing plugin for mbarcode? I really dont know how to achieve that yet.

It seems like your error log has been cut off. I'm suspecting that you are missing some libraries and that the error log is mentioning the missing headers in the beginning. If you look at the control file in our debian folder, you'll find all the libraries it depends on at build (some of them are needless, but we've not yet cleaned that list up). The library packages should be these:
Code:

debhelper (>= 5), libzbar-dev, libdmtx-dev, gstreamer0.10-plugins-bad-dev | maemo-version (<5.0), libconic0-dev,
libgstreamer0.10-dev, libosso-abook-dev | maemo-version (<5.0), libosso-dev, libgtk2.0-dev,
libgconf2-dev, libglib2.0-dev, libebook-dev | maemo-version (<5.0), libgstreamer-plugins-base0.10-dev,
libcurl3-dev, mce-dev | maemo-version (<5.0), libmodest-dbus-client-dev, libhildonfm2-dev,
libqt4-dev

I believe running "apt-get install ..." with that list would do the trick (although you might have to run them without the paranthesis and | signs).

To develop a plugin you are probably best off at the moment by starting with the webrequest or QR-code plugin and modify parts of that code. You'll need the mbarcode-dev package to build the plugins. After building you put the plugin into /usr/share/mbarcode/plugins/ on your device.

I'm going to write a guide on writing plugins soon, but I'm afraid I don't have time to do that right now.


All times are GMT. The time now is 08:47.

vBulletin® Version 3.8.8