Commit Graph

7266 Commits

Author SHA1 Message Date
Rene Gollent 7d4a7ce33e Add ability to specify case insensitive matching. 2013-06-05 22:02:43 -04:00
Rene Gollent 47fedeb598 Import RegExp classes from Ham.
Minor adjustments made by myself to fit into Haiku better.
2013-06-05 22:02:42 -04:00
John Scipione fc77b031d7 Revert "BBox: Always offset the top border by the same amount"
This reverts commit 39899cf662.

Checked with BeOS R5, and this is not how it works, to remain
compatable we need to go back to how this was before.
2013-05-30 21:47:04 -04:00
John Scipione 39899cf662 BBox: Always offset the top border by the same amount
...so that the top border of BBox's with no labels, BBox's with
text labels, and BBox's with BControl labels will all line up.
2013-05-30 20:38:04 -04:00
John Scipione f9954bfc69 Style fixes to BBox, update copyright header 2013-05-30 20:35:42 -04:00
John Scipione ca3a1c0451 BMenuField: If fixed size always set max content width
When you resize, also set max content width.

Create a SetMaxContentWidth() method that includes the margins.
2013-05-30 00:05:17 -04:00
John Scipione 92c12506ac Move kMinMenuBarWidth to MenuField.cpp 2013-05-30 00:05:16 -04:00
John Scipione a1cf3ead5f Resize menu field if below minimum width in auto-size mode
... cancelling the normal item truncation behavior.
This funcationality comes from BeOS R5, we need to reproduce it for
backwards compat. KeymapSwitcher depends on it at least.

Minimum width is 20px, was set in last commit, comes from BeOS R5.
2013-05-30 00:05:16 -04:00
John Scipione 6031e62420 Move constants to BMCPrivate.h and refactor
We use these constants in both MenuField.cpp and BMCPrivate.cpp

Incorporate kMarginWidth into kPopUpIndicatorWidth.

A small code simplication in FrameResized() along with replacing bare numbers
with magic constants.
2013-05-30 00:05:15 -04:00
Jérôme Duval 78b461d6a1 Merge branch 'virtio' 2013-05-26 17:12:25 +02:00
Jérôme Duval 6bbf9c9da9 Virtio: added drivers for PCI busses, bus manager and block device.
* the Virtio PCI bus driver exposes a Virtio controller to the Virtio bus manager,
which in turn exposes a Virtio device consumed by Virtio drivers. Drivers follow the
new driver model.
* virtio_block handles Virtio block devices under disk/virtual/virtio_block/x/raw.
* Here is the Qemu command line option for Virtio disk devices:
  -drive file=haiku.image,if=virtio
* the PCI bus driver currently supports only legacy interrupts (no MSI(-X) yet).
* There is room for improvements in the bus manager:
  - it notifies the host for each queued request, which isn't optimal.
  - transfer descriptors should probably be simply preallocated (they are nicely
    leaked at the moment).
  - indirect descriptors are not supported yet.
and in the block driver:
  - get the id of the disk.
  - implements flushing the cache.
  - improves dma restrictions.
  - do_io() should use a page for header descriptors instead of malloc(), which
    could cross boundaries.
* The device manager tries to guess the driver based on the PCI device type, this
implies having to declare the "busses/virtio" path for each possible type
provided by Virtio. Thus future driver additions might require patching the device
manager.
* virtio.h is still private, the API is subject to changes.
* virtio_pci.h, virtio_blk.h, virtio_ring.h are copied unchanged from FreeBSD.
2013-05-26 17:02:50 +02:00
Siarzhuk Zharski 3bbef9dd76 Discard Termcap and switch console apps to use Terminfo
* Switch bash, debugger, less, telnet[d] and top apps to use termcap
  functionality provided by ncurses lib instead of GNU libtermcap.so;
* NetBSD version of tput utility replaced with ncurses' one. Fixes #9606;
* terminfo database is provided as mandatory package installed during
  building target system;
* Remove libtermcap module. The termcap database source and
  corresponding build rules are not removed to provide backward compatibility -
  until all optional packages will be rebuild on upcoming system version
  using terminfo. Note that gcc2 builds may require to provide termcap a bit
  longer in the sake of binary compatibility with R5 era apps.
2013-05-23 14:07:50 +02:00
Pawel Dziepak 07e1875ea2 libroot: explicitly check ABI version
As Axel suggested use simple, explicit checks for legacy ABI version
instead of obscure "compatibility mode".
2013-05-22 19:31:05 +02:00
Jérôme Duval 21f6b3ea28 agp_gart: switch to phys_addr_t as suggested by Urias and Axel.
* this is a follow-up to hrev45621
2013-05-16 19:01:33 +02:00
Pawel Dziepak 5d0a1da8bf libroot: make all areas executable for old binaries
* If at least one image is either B_HAIKU_ABI_GCC_2_ANCIENT or
   B_HAIKU_ABI_GCC_2_BEOS almost all areas are marked as executable.
 * B_EXECUTE_AREA and B_STACK_AREA are made public. The former is enforced since
   the introduction of DEP and apps need it to correctly set area protection.
   The latter is currently needed only to recognize stack areas and fix their
   protection in compatibility mode, but may also be useful if an app wants
   to use sigaltstack from POSIX API.
2013-05-15 00:06:39 +02:00
John Scipione f6d93b80f3 Remove the unused bounds parameter from DrawLabel
Also refactor BMenuField::Draw()
2013-05-09 21:29:13 -04:00
John Scipione 91810d8efd Use better variable names in SetDivider 2013-05-09 21:29:12 -04:00
John Scipione df5d08a718 Style fixes to BMenuField
Rename resize to resizingMode, whitespace fixes, compare to 0 explicitly
2013-05-09 21:29:12 -04:00
Adrien Destugues 2b67ff2420 Add AddText method to AboutWindow
* Factor out the code to add some data to the about window, with a header and a content under it
 * Make this method public so it's possible to add custom entries in an about box
 * If the method is called with only the header or only the content, the text is added non-bold and non-indented (like the description entry*).
 * Make the header text bold. I'm not sure it looks that good, after all. Thoughts ?
2013-05-09 21:27:43 +02:00
John Scipione e28ba280de BMCPrivate: Cleanup
Remove no longer needed header includes, most that I recently added
a few that were already there but just aren't needed anymore. Don't
use BPrivate::MenuPrivate namespace.
2013-05-06 18:29:34 -04:00
John Scipione c1a7e89fc2 Put the label truncation code back in BMenuItem.
Just a few commits ago I moved the label truncation code out of
BMenuItem and into BMCMenuBar because the truncation had to happen
outside of BMenuItem. Turns out, that wasn't true so I'm moving the
label truncation back into BMenuItem and removing the _DrawItems()
method from BMCMenuBar.

Note that the code is not a copy of what was there before, but, the
updated version I created for BMCMenuBar. The main difference is that
I use menuPrivate.Padding() instead of GetItemMargins() and I always
use the width of the parent menu frame instead of using fBounds even
if the state is not MENU_STATE_CLOSED. These are changes needed for
BMCMenuBar but should work just as well for a regular BMenu.
2013-05-06 17:55:33 -04:00
John Scipione c333966291 Draw truncated menu label in BMCPrivate, fixes #9735
...instead of in BMenuItem and remove the truncation code from BMenuItem.

The label truncation code cannot work in BMenuItem because the super
menu helpfully resizes itself to fit the menu item. So, instead we do the label
truncation in BMCPrivate making sure that BMenuItem there can't expand the
BMCMenuBar because we set the width to fMenuField->_MenuBarWidth()
explicity.

Note that this only truncates the label in BMCMenuField, i.e. the label inside
the menufield, it does nothing to the labels of the menu items in the attached
BMenu or BPopUpMenu which is exactly what we want.
2013-05-06 17:15:20 -04:00
John Scipione 2bf1592a70 Rework layout-enabled contructor for BMCMenuBar
Was passing !fixedSize into the view flags of BMenuBar, which made no sense.
Stop doing that, set fixedSize to true instead.

Remove the fixedSize parameter from this contructor, it's too late for that.
2013-05-06 17:15:19 -04:00
John Scipione d5c51ba676 Update header comments 2013-05-06 17:15:18 -04:00
John Scipione d97b434060 Style fixes to BMenu and related classes. 2013-05-06 17:15:17 -04:00
Rene Gollent 69d85497fd Fix update issues in BStringColumn.
In some cases, BStringColumn wouldn't properly detect that an update was
needed, and would consequently fail to truncate a string as needed with
a column resize.
2013-05-04 21:17:47 -04:00
Jérôme Duval c162f52eaa intel_extreme and radeon_hd: some 64 bit fixes 2013-05-04 20:20:33 +02:00
Jérôme Duval dc4e3ce337 added B_PRIxOFF 2013-05-04 15:31:04 +02:00
Philippe Houdoin 1a84d6b362 Skip timeout computation in is_syscall_restarted case. 2013-05-04 11:27:04 +02:00
Jérôme Duval 843a122fd9 MediaPlayer: some 64 bit fixes 2013-05-04 11:15:41 +02:00
Jessica Hamilton 4898c615d6 BMenu: scroll marked item into view when menu has scrollers attached.
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2013-05-03 21:10:51 +02:00
Axel Dörfler 4e78098e7c DatagramSocket: don't use absolute timeout 0.
* Use relative instead, or else the return value will be B_TIMED_OUT instead
  of B_WOULD_BLOCK.
* This fixes bug #9734.
2013-05-03 21:03:54 +02:00
Jérôme Duval e5d65858f2 Fix more GCC4 narrowing conversion warnings.
* Code style would be to fix.
2013-05-03 19:42:04 +02:00
Axel Dörfler 3bf9915247 Removed superfluous class definitions from OutlineListView.h
* Why?
2013-05-03 13:24:30 +00:00
John Scipione f56bf5b03e Add class declarations to header 2013-05-02 20:13:47 -04:00
John Scipione 01b1b8bdaa BPopUpMenu style fixes 2013-05-01 22:18:56 -04:00
Rene Gollent 736cc3dcb4 Move comment to correct function. 2013-05-01 19:52:00 -04:00
Adrien Destugues 31535ac63b Make BAboutWindow modal
* Set its type to B_MODAL_WINDO, and also set B_NOT_MOVABLE
 * Since this removes the window tab, add an "Ok" button to close the window
 * Remove the GetWindow mess and just use it as any regular window
 * Adjust all callers again

The AlertPosition method doesn't seem to work right, the window pops up
offset to the right. I also noticed that some of our calls to BAboutWindow
are actually not reacable because we removed Abutrequested from the apps.
Maybe we should clean them up (locale preflet and activity monitor are examples)

More annoying is the fact that opening a modal window from a deskbar replicant
is modal against the whole deskbar. Not sure what to do about that.
2013-05-01 10:10:37 +02:00
Rene Gollent 196ab88d06 Extend debug_create_symbol_lookup_context().
- debug_create_symbol_lookup_context() now takes an image ID
  parameter that can optionally be used to restrict the symbols
  it gathers to only those of the targeted image rather than the
  entire team, allowing for significantly more lightweight usage
  when the desired image is known. The previous behavior can still
  be obtained if desired by passing -1 as said ID.

- Adjust callers.
2013-04-30 21:34:45 -04:00
John Scipione f3decd2060 Fix #9726 Revert CenterIn() and CenterOnScreen()
... back to their previous void returning roles. AlertPosition() is used instead to
check that an alert fits within the sides of the screen and all that.

Also add another CenterOnScreen() method that takes a Screen ID
so you can center a window on another monitor that the one it is currently on
(theoretically someday anyway).
2013-04-30 20:15:33 -04:00
John Scipione 6723d9fc94 Create a BWindow::AlertPosition() method and use it
...to position alert's and open/save dialogs nicely inside of the parent window,
or if that is unavailable, the screen frame.

AlertPosition() is private (for now) but BAlert and BFilePanel are BWindow's friends so
BWindow allows those classes to touch it's privates.
2013-04-30 20:15:32 -04:00
Adrien Destugues fd19c7366d Fix BAboutWindow lifecycle
BAboutWindow returned false in QuitRequested in order to hide instead of closing.
Not only this keeps a BLooper running for a rarely used window, but it also
prevents quitting an application in the window was not destroyed first.

 * Remove aforementioned QuitRequested method,
 * Add a static GetWindow method that returns the existing about window, if there
is one, or creates one if there is not. A boolean can be set to tell the caller
what happened,
 * Adjust all callers to use that new method, instead of managing the window themselves.
2013-04-30 21:50:24 +02:00
John Scipione 54153cc8b2 Update CenterIn() and CenterOnScreen() methods in BWindow
* These methods now return the new point after centering.
* But more importantly CenterIn() does some new adjustments to keep the window
  position inside the screen edge. If you pass the screen frame into CenterIn()
  it skips these adjustments.
2013-04-28 20:30:21 -04:00
Ingo Weinhold 274ca38fd1 BOpenHashTable::Clear(): Set fItemCount to 0
If not empty, the count would afterwards be out of sync with reality.
2013-04-27 16:21:41 -04:00
Rene Gollent aa366c07b1 Add an information blurb option to PromptWindow.
- PromptWindow now takes a parameter which contains optional
  informational text to display above the text control.

- Adjust callers.
2013-04-27 14:04:33 -04:00
Jérôme Duval f92b1f2eaf GCC 4.7.x finds that 1 << 31 is a signed integer, use the unsigned notation
* error: narrowing conversion of '-2147483618' from 'int' to 'uint32 {aka long unsigned int}'
 inside { } is ill-formed in C++11
2013-04-26 21:17:33 +02:00
Rene Gollent c24adb2950 Rework DefaultNotificationService registration.
- Instead of implicitly registering and unregistering a service
  instance on construction/destruction, DefaultNotificationService
  now exports explicit Register()/Unregister() calls, which subclasses
  are expected to call when they're ready.

- Adjust all implementing subclasses. Resolves an issue with deadlocks
  when booting a DEBUG=1 build.
2013-04-22 18:42:21 -04:00
Pawel Dziepak 46575667eb Merge branch 'aslr' 2013-04-17 20:07:32 +02:00
John Scipione af84ce79da Rename B_COLOR_WHICH_COUNT to kColorWhichCount 2013-04-16 03:44:42 -04:00
Pawel Dziepak 8614737f71 elf: restore correct region protection after relocation 2013-04-16 03:44:38 +02:00
Alexander von Gluck IV 88e9c0961a libnetwork: Check for ipv4 flag in resolv.conf
* Add option for forced IPv4 resolution.
* Helps with #8293
* Very slightly modified patch by donn
2013-04-14 17:03:32 -05:00
Siarzhuk Zharski 1f8d927251 Make Windows-1250 encoding consistent with other
In sake of consistency with other Windows CP encodings:
* print_name is expanded to "Windows Central European (CP 1250)";
* B_MS_WINDOWS_1250_CONVERSION id looks like should be added into UTF8.h;
* mime_name set to NULL as other windows codepages have. That prevents
  at least from duplicating too much 1250's in the Terminal, Mail and
  StyledEdit encodings menus.
2013-04-14 21:39:13 +02:00
Stefano Ceccherini 501201761b In case the BMenu is inside a BMenuField, override the items width to
span over the BMenuField's width. Note that if the BMenu is already
wider, we don't shrink it, at least for now.
Fixes #5015.
2013-04-13 10:31:20 +02:00
Rene Gollent d04cbc3f3c Add missing const. 2013-04-12 23:28:46 -04:00
Pawel Dziepak 87d1bdb87c util: add secure pseudorandom number generator 2013-04-11 12:31:58 +02:00
Pawel Dziepak 69042ecd1b util: style fixes 2013-04-11 12:15:47 +02:00
Pawel Dziepak 6003243ef3 util: introduce kernel utils for pseudorandom number generation
Currently there are two generators. The fast one is the same one the scheduler
is using. The standard one is the same algorithm libroot's rand() uses. Should
there be a need for more cryptographically PRNG MD4 or MD5 might be a good
candidates.
2013-04-11 04:34:59 +02:00
John Scipione 429ae1b151 A few more style fixes to ListView and ColorSet, thanks Axel 2013-04-09 19:24:51 -04:00
Pawel Dziepak bf65fc1dfe vm: remove B_RANDOMIZED_IMAGE_ADDRESS address specification
This address specification is actually not needed since PIC images can be
located anywhere. Only their size is restriced but that is the compiler and
linker concern. Thanks to Alex Smith for pointing that out.
2013-04-09 22:09:13 +02:00
John Scipione 63f3755c5f Many style fixes to ListView 2013-04-09 00:17:37 -04:00
Siarzhuk Zharski b6fd91b409 Switch BUnicodeChar to wrap the ICU's UChar32 one
Improve the unicode character processing and classifying routines by
wrapping up the UChar32 procedures from ICU. That fixes functional
regression introduced in hrev38017 and allows to fix East Asian Width
problems int the Temrinal.
2013-04-07 20:14:37 +02:00
John Scipione 1b41173c8a Add diagonal arrows to ControlLook DrawArrowShape() method 2013-04-07 03:02:01 -04:00
John Scipione ab3c19541d Move B_COLOR_WHICH_COUNT to private ServerReadOnlyMemory header.
This means the B_COLOR_WHICH_COUNT goes from being a public constant to a
private one. It sill looks like a public constant starting with a B_ though.
I hope that's not a big deal. Too bad we can't get the count of an enum.
2013-04-06 17:13:36 -04:00
John Scipione 3302521556 Remove dependence on color constants in ServerReadOnlyMemory.
This fixes a maintainance problem where you have to update this otherwise
unrelated file to keep it in sync whenever you add a color constant.

I've added a B_COLOR_WHICH_COUNT constant to the color_which enum which should
be updated to point to the newest color constants as new ones are added. I
reworked ServerReadOnlyMemory to use this constant instead of using to the
current largest color constant directly. If you use B_COLOR_WHICH_COUNT to
refer to a color in your code expect to get unpredictable and nonsensical
results. Most likely you'll get an undefined result which will return black
but don't depend on it.

The net effect of this is that ServerReadOnlyMemory doesn't need to be updated
anymore when new color constants are introduced but will continue to produce
correct results.

Eliminate kNumColors constant, replace it with B_COLOR_WHICH_COUNT
2013-04-05 22:46:22 -04:00
John Scipione 9f24981a56 Add B_SCROLL_BAR_THUMB_COLOR constant.
This allows you to change the scrollbar thumb color in Appearance preferences.
The default color is 216, 216, 216 so the scroll bar thumb looks the same by
default. Perhaps someday this can be updated to something a bit more colorful.
2013-04-05 19:26:41 -04:00
Pawel Dziepak a8f8d2c057 x86_64: put user stack and team data at top of user address space 2013-04-04 20:54:56 +02:00
Pawel Dziepak 65ed4fa908 vm: implement B_RANDOMIZED_IMAGE_ADDRESS address specification
On some 64 bit architectures program and library images have to be mapped in
the lower 2 GB of the address space (due to instruction pointer relative
addressing). Address specification B_RANDOMIZED_IMAGE_ADDRESS ensures that
created area satisfies that requirement.
2013-04-04 20:54:02 +02:00
Pawel Dziepak f697412ff8 vm: place commpage and team data near the top of user address space
Placing commpage and team user data somewhere at the top of the user accessible
virtual address space prevents these areas from conflicting with elf images
that require to be mapped at exact address (in most cases: runtime_loader).
2013-04-04 15:27:24 +02:00
Pawel Dziepak e85e399fd7 commpage: randomize position of commpage
This patch introduces randomization of commpage position. From now on commpage
table contains offsets from begining to of the commpage to the particular
commpage entry. Similary addresses of symbols in ELF memory image "commpage"
are just offsets from the begining of the commpage.

This patch also updates KDL so that commpage entries are recognized and shown
correctly in stack trace. An update of Debugger is yet to be done.
2013-04-04 15:27:22 +02:00
Pawel Dziepak 966f207668 x86: enable data execution prevention
Set execute disable bit for any page that belongs to area with neither
B_EXECUTE_AREA nor B_KERNEL_EXECUTE_AREA set.

In order to take advanage of NX bit in 32 bit protected mode PAE must be
enabled. Thus, from now on it is also enabled when the CPU supports NX bit.

vm_page_fault() takes additional argument which indicates whether page fault
was caused by an illegal instruction fetch.
2013-04-04 15:22:23 +02:00
Pawel Dziepak 211f71325a x86: move x86_userspace_thread_exit() from user stack to commpage
x86_userspace_thread_exit() is a stub originally placed at the bottom of
each thread user stack that ensures any thread invokes exit_thread() upon
returning from its main higher level function.

Putting anything that is expected to be executed on a stack causes problems
when implementing data execution prevention. Code of x86_userspace_thread_exit()
is now moved to commpage which seems to be much more appropriate place for it.
2013-04-04 15:16:27 +02:00
Pawel Dziepak b3e4c67739 vm: implement B_RANDOMIZED_ANY_ADDRESS address specification
Randomized equivalent of B_ANY_ADDRESS. When a free space is found (as in
B_ANY_ADDRESS) the base adress is then randomized using _RandomizeAddress
pretty much like it is done in B_RANDOMIZED_BASE_ADDRESS.
2013-04-04 15:16:21 +02:00
Pawel Dziepak f9bab525f6 vm: implement B_RANDOMIZED_BASE_ADDRESS address specification
B_RAND_BASE_ADDRESS is basically B_BASE_ADDRESS with non-deterministic created
area's base address.

Initial start address is randomized and then the algorithm looks for a large
enough free space in the interval [randomized start, end]. If it fails then
the search is repeated in the interval [original start, randomized start]. In
case it also fails the algorithm falls back to B_ANY_ADDRESS
(B_RANDOMIZED_ANY_ADDRESS when it is implemented) just like B_BASE_ADDRESS does.

Randomization range is limited by kMaxRandomize and kMaxInitialRandomize.
2013-04-04 15:16:21 +02:00
Pawel Dziepak 3b4269ecf5 arch: randomize initial user stack pointer
Inside the page randomization of initial user stack pointer is not only a part
of ASLR implementation but also a performance improvement that helps
eliminating aligned 64 kB data access.

Minimal user stack size is increased to 8 kB in order to ensure that regardless
of initial stack pointer value there is still enough space on stack.
2013-04-04 15:16:20 +02:00
Michael Lotz a9abcc37cd Rework initial auto joining and add big TODOs.
* If we have a configured network, then we always try to connect to it
  as soon as the interface has been brought up.
* If we don't have a configured network and are auto configuring, we
  use the AutoconfigLooper to also do initial auto joins.
* Before issuing auto joins we need to wait for scan results to come
  in, so we watch for corresponding messages.

For now auto joining is a one shot attempt as the infrastructure to
properly tell reasons for scans apart is not yet there.
2013-04-02 04:59:44 +02:00
Michael Lotz 6de478363e Add BMessenger::SetTo() to reinitialize a BMessenger.
This allows to reuse BMessenger objects for different targets, or to
recheck validity after initial creation. With that one can use the same
BMessenger after launching an application that was previously not found
valid for example.
2013-03-31 20:16:04 +02:00
Alex Smith 5e0c3db286 Account for the physical map area in the kernel VM space. Fixes #9547.
The physical memory map area was not included in the kernel virtual
address space range (it was below KERNEL_BASE). This caused problems
if an I/O operation took place on physical memory mapped there (the
bad address error seen in #9547 was occurring in lock_memory_etc()).
Changed KERNEL_BASE and KERNEL_SIZE to cover the area and add a null
area that covers all of it. Also changed X86VMTranslationMap64Bit to
handle large pages in Query(), as the physical map area uses large
pages.
2013-03-22 18:30:01 +00:00
Axel Dörfler 928001cea9 Further tuned AMD CPU identifier parsing.
* Thanks to a list of 1384 entries with AMD CPU identifiers from Alex.
2013-03-22 09:37:47 +01:00
Axel Dörfler df4d35e837 Added a parse_amd() for CPU identification.
* This parses the reported CPU name, and tries to translate it to a normal
  and concise identifier.
* For example, it will translate "AMD FX(tm)-8320 Eight-core Processor" into
  "FX™ 8320" or "Dual Core AMD Opteron(tm) Processor 275 HE" into
  "Opteron™ 275 HE".
* This means we can remove AMD strings for those models for which this
  function produces useful results.
2013-03-20 21:04:23 +01:00
Alexander von Gluck IV 190423a656 cpu_type: Add model 2 AMD FX CPU 2013-03-20 13:15:28 -05:00
John Scipione ab21cedcce Remove docs and refactor style of TextView class.
* Make pointer style consistent, const char* name instead of const char *name.
* Lots of parameter renaming.
* in parameters don't get anything special, just font, or length instead of
  inFont, inLength.
* out parameters get a leading _ so *outWidth becomes *_width for example.
* We don't detail private function in the Haiku book and this class has a bunch
  so keep the documentation in the file but use regular comments instead.
* Normalize the parameter names between cpp file and header.
* Some minor whitespace fixes.

No functional change intended.
2013-03-16 17:05:09 -04:00
Pawel Dziepak 7f61e6e4e5 Merge branch 'nfs4'
Conflicts:
	build/jam/HaikuImage
2013-03-11 13:00:55 +01:00
Michael Lotz 4a0460a9bc Add generic unlock key setting and removal.
* Replace {Set|Remove}MasterKey() by generic {Set|Remove}UnlockKey()
  that works on a keyring.
* Implement {Set|Remove}MasterUnlockKey() on top of that.
* Rename the commands and constants accrodingly.
* Implement setting and removing keyring unlock keys.
2013-03-05 11:04:57 -05:00
Michael Lotz d4d6d12393 Don't require a key when creating a new keyring.
There will be key setting/removal functions so the step of adding the
keyring and setting a key on it can be done individually.
2013-03-05 11:04:53 -05:00
Michael Lotz 8775bd129d Remove old TODO as we don't support multiple instances for now.
As there aren't any more generic meta data containers inside BKey,
there's no real way to distinguish different instances with the same
identifiers. This may be added later, for example the same index system
as used in BMessage could apply.
2013-03-05 11:04:51 -05:00
Michael Lotz f8ccc32326 Remove the API part of the concept of apps per key.
The application access concept is on the keyring level only for now.
Generally it probably would get pretty complicated and therefore harder
to use when application access needs to be granted on a per key basis.
2013-03-05 11:04:33 -05:00
Michael Lotz c8ae843f3d Rename keyring "access/revoke" to "unlock/lock".
The unlock/lock concept just seems easier to grasp and is used in
various similar tools as well.
2013-03-05 11:04:30 -05:00
Michael Lotz 64ca113fe0 Add keyring specific versions of the *Application() methods. 2013-03-05 11:04:10 -05:00
Michael Lotz 51ab46a83c Remove the purpose argument from all GetKey() variants.
The type is relevant and required as it determines the type of the
handed in key. The purpose however isn't actually needed and rather
inconvenient to get by depending on the situation.
2013-03-05 11:04:08 -05:00
Michael Lotz 94f897deea Make Flatten/Unflatten public and remove IsRegistered().
The BKey doesn't know anything about the keyring concept, so the
registered info isn't really useful. May be re-added later with
keyring info as well.
2013-03-05 11:04:02 -05:00
Michael Lotz 5d4a0da455 Remove unneeded master access revoke command.
Revoking master access currently simply means to revoke access
to the default keyring.
2013-03-05 11:00:03 -05:00
Michael Lotz d962e21058 Add B_KEY_PURPOSE_KEYRING for keyring keys. 2013-03-05 10:59:57 -05:00
Michael Lotz c494c06109 Add B*Key::PrintToStream() method for debugging convenience. 2013-03-05 10:59:51 -05:00
Michael Lotz 005a15bbcd Move keystore message constants and use a messenger.
* The keystore backend will (at least for the time being) reside in a
  separate server. This one can be reached via normal messaging, so use
  a BMessenger for sending key messages.
* Move the message constants from RegistrarDefs.h into a new
  KeyStoreDefs.h that also contains the server signature.
* Update the message constants to reflect the new situation.
2013-03-05 10:59:47 -05:00
Michael Lotz 1c3996496b Implement all KeyStore methods except for password generation.
* Add all relevant message constants.
* Implement the messaging to send/retrieve key info.
* Implement _Flatten/_Unflatten for sending flat BKey objects.
* Remove application list from BKey, the key can't only differ by
  allowed applications as the identifiers would still collide, so the
  comparison isn't needed to uniquely identify the key. The applications
  can be enumerated via the BKeyStore instead.
2013-03-05 10:59:46 -05:00
Michael Lotz b73982892d Rename [Un]Register* functions to Add/Remove*. 2013-03-05 10:59:44 -05:00
Michael Lotz dc1acef865 Flesh out the API and implement stubs.
* Modified the API greatly to be based on BKey* instead of BPassword*.
* Added BKeyPurpose and used it instead of BKeyType. It is supposed to
  indicate the purpose of a key so that an app can look up keys on a
  more granular level. The BKeyType on the other hand actually
  identifies the type (i.e. subclass of BKey) so an app knows how to
  handle a given key or may only enumerate/use keys it is compatible
  with.
* Made everything based on a raw data buffer for now, only BPasswordKey
  is implemented yet which stores the (0 terminated) string into that
  data buffer.
* Removed the additional data BMessage as I don't yet see where it fits
  in. While I could imagine adding meta data to a key may be nice it
  might be an interoperability concern when keys are shared by
  different apps.
* Moved the app functions to the keystore as per the TODO, but not sure
  how to actually implement them.
2013-03-05 10:59:43 -05:00
Michael Lotz 3b3884d9ee KeyStore and Key interface/stubs draft per Axel Dörfler.
A draft API and (mostly) stubs to back it up. Initial import of yet
unmodified sources.
2013-03-05 10:59:41 -05:00
Tri-Edge AI 49126a0e9b Added ResourceEdit and modified BColumnListView, BRow and BMenu.
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2013-02-27 22:08:46 -05:00
John Scipione 5dd0761042 Move BVolumeRoster docs to Haiku Book.
With this commit every class in the storage kit is now documented
in the Haiku book!

Thanks to Ingo, Axel, Vincent Dominguez, Tyler Dauwalder, and
everyone who helped document these classes.
2013-02-22 18:11:14 -05:00