[haiku-bugs] Re: [Haiku] #6113: Locale Kit needs a way to load catalogs from libraries
- From: "bonefish" <trac@xxxxxxxxxxxx>
- Date: Wed, 30 Jun 2010 14:21:02 -0000
#6113: Locale Kit needs a way to load catalogs from libraries
-----------------------------+----------------------------------------------
Reporter: zooey | Owner: pulkomandy
Type: bug | Status: assigned
Priority: normal | Milestone: R1
Component: Kits/Locale Kit | Version: R1/Development
Keywords: | Blockedby:
Patch: 0 | Platform: All
Blocking: 5889 |
-----------------------------+----------------------------------------------
Comment(by bonefish):
Replying to [comment:8 pulkomandy]:
> Ok, I'm getting it.
> One more question, however : how can it find out the shared object from
the address ? I had a look at the be book but couldn't find anything (I
think it's in Kernel/Image, but...). Do I need to use get_image_info and
look for the address ranges, until I find the one that matches the pointer
? Isn't there any "reverse lookup" for this ?
No, ATM iterating through the images via get_next_image_info() is the only
way. Maybe we should introduce a
{{{
status_t get_image_info_for_address(team_id team, addr_t address,
image_info* info);
}}}
to make this more efficient.
> Also, is there a reliable way to derive a mimetype from this info ? For
an application I know only of be_app->GetAppInfo ; I have no idea what I
can do for add-ons and libraries.
Once you have the library/add-on path you can use
BAppFileInfo::GetSignature().
> Is there even a mimetype set on libraries at all ?
Usually not, but that could made a requirement, if a library wishes to use
the locale kit.
--
Ticket URL: <http://dev.haiku-os.org/ticket/6113#comment:9>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.
Other related posts: