ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'd like to implement photo transfer support in libgpod for a Computer Projects class in school. The thing is, the code is written in C, and while I've done some C programming, I'm more familiar w/ C++. I'm at functions in both, and I'm pretty sure I can refresh my memory. My question is, where should I start? I've read some of the source code, and i'm not sure how this works exactly. My understanding is that the library provides the functions available, and then the program calls the functions? Are there any resources out there that teach library stuff? Do I need to know gtk(since gtkpod is in gtk, and libgpod is for gtkpod)? Is there something else I should be looking at?
. My question is, where should I start? I've read some of the source code, and i'm not sure how this works exactly.
The general idea how it works should be the first thing you look into. Try to trace one single function (initialization etc), then move to another etc. Should be easier this way.
Quote:
My understanding is that the library provides the functions available, and then the program calls the functions?
Exactly.
Quote:
Are there any resources out there that teach library stuff?
I don't think you need them. Library is just a set of functions. There are special issues when you compile it etc, but not when just using it.
Quote:
Do I need to know gtk(since gtkpod is in gtk, and libgpod is for gtkpod)? Is there something else I should be looking at?
Probably, at a basic level (I guess so, haven't downloaded the source). My guess is that it'll be more about lists and such things than about GTK gui. You don't need to know it well. Just browsing GTK reference (not in detail, just what does a certain function do) should be enough.
Is there any way to trace a function easily? The developer I talked to said to implement this in the library first, and then potentially it'll be brought into gktpod. Do you mean read the function source code? or do you mean look at how it's used in gtkpod, and then read the function? Or am I completely missing the meaning.
You can try both ways and see what's easier for you. I guess the gtkpod code is not that simple, so learning what it realy does may be tricky. Reading the library function may be much easier. For all GTK (and GTK-related) functions used, just have GTK reference open, see what arguments a certain function needs, what it returns, don't look into the details.
i took a look at the source and you should be prepared to sit down with a pen and piece of paper and track what does what to get started.. it is definately not simple..
one thing i did notice is that there are functions in the lib for thumbnails. transfer, storage, removal.. i would start there and learn how those work.. maybe you could even implement some of the existing code..
yes, I was thinking that some of those functions could be reimplemented. The thing is, it looked to me as though a lot of functions call other functions. It sounds like it's going to be a pretty big task. Does it look that way to those of you who have looked at the code?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.