Commit Graph

183 Commits

Author SHA1 Message Date
John Scipione 732c579702 Roster: style fixes.
* Check if == NULL or == 0 explicitily
* Use NULL instead of 0 as default value for pointers in header.
* other little stuff, new lines, comments
2014-06-25 19:31:24 -04:00
John Scipione e0016ffde9 Style fixes to BRoster, move docs to doxygen.
Keep the brief description as a regular comment above each public method.

Leave the docs of private methods.

Some variable renaming mostly because of abbreviations.

Add documentation for all the public methods and app_info members and defines
that didn't have docs in the cpp file.
2014-06-25 15:35:09 -04:00
Ingo Weinhold 5c9672edeb Add watching support for installation location package changes
Can be requested/stopped via BPackageRoster::{Start,Stop}Watching().
The notification message has the what code B_PACKAGE_UPDATE and contains
fields "event", "location", and "change count".
2014-06-17 20:32:26 +02:00
John Scipione be902ac4db App Kit: style changes.
No functional change intended.

Focused on documented classes only.

* Update copyright information.
* whitespace fixes.
* pointer style
* Rename some variables, msg => message, form => what
* Need consistent variable names to make documentation easier,
  allows us to use \copydoc or \copydetails instead of repeating
  ourselves over and over again.
2014-06-11 16:24:02 -04:00
Ingo Weinhold 5d7f782d4e BLooper: Add DispatchExternalMessage()
* This is primarily a service method for ports of widget tool kits
  that require single-threaded GUI. DispatchExternalMessage() calls
  DispatchMessage(), but also sets fLastMessage, so that
  [Detach]CurrentMessage() work correctly. This allows to detach a
  message in DispatchMessage() when called from the window thread,
  add it to a global queue, and later process the queued messages in
  a different thread that calls DispatchExternalMessage().
* BLooper/BWindow: Make sure fLastMessage is accessed only when locked.
2013-12-20 15:47:23 +01:00
Ingo Weinhold 94dc74b027 More explicit denoting the BPrivate namespace 2013-09-10 19:14:18 +02:00
Ingo Weinhold 18f5cd171b Explicitly denote BPrivate to avoid clashes 2013-09-10 19:14:18 +02:00
Ingo Weinhold 3e8daeb7bc Add BMessenger::HashValue() 2013-06-27 21:57:42 +02:00
Ingo Weinhold 25a7b01d15 Merge branch 'master' into package-management
Additional changes:
* Add src/system/kernel/lib/zlib, which builds a kernel version of zlib,
  needed by packagefs.
* BuildFeatures: Add a build feature "gcc2" to allow for easier checks.
* Referenceable.cpp: Include <OS.h> instead of <debugger.h>. The latter
  is not needed and prevents building for the build platform.
* zlib/zutil.h: Fix gcc 2 build. We really should use the external
  package instead.

Conflicts:
	.gitignore
	build/jam/BuildSetup
	build/jam/FileRules
	build/jam/FloppyBootImage
	build/jam/HaikuImage
	build/jam/ImageRules
	build/jam/KernelRules
	build/jam/NetBootArchive
	build/jam/OptionalBuildFeatures
	build/jam/OptionalLibPackages
	build/jam/OptionalPackageDependencies
	build/jam/OptionalPackages
	build/scripts/build_haiku_image
	configure
	data/bin/installoptionalpackage
	data/system/boot/Bootscript
	headers/os/app/Message.h
	headers/os/package/PackageInfo.h
	headers/os/package/PackageInfoAttributes.h
	headers/os/package/PackageInfoSet.h
	headers/os/package/PackageRoster.h
	headers/os/package/PackageVersion.h
	headers/os/package/hpkg/PackageInfoAttributeValue.h
	headers/os/storage/FindDirectory.h
	headers/os/storage/Node.h
	headers/os/support/StringList.h
	headers/private/system/directories.h
	src/add-ons/kernel/drivers/audio/ac97/es1370/Jamfile
	src/add-ons/kernel/file_systems/packagefs/AttributeIndex.cpp
	src/add-ons/kernel/file_systems/packagefs/Jamfile
	src/add-ons/kernel/file_systems/packagefs/Package.cpp
	src/add-ons/kernel/file_systems/packagefs/Package.h
	src/add-ons/kernel/file_systems/packagefs/PackageDomain.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageDomain.h
	src/add-ons/kernel/file_systems/packagefs/PackageFSRoot.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageLinkDirectory.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageLinkDirectory.h
	src/add-ons/kernel/file_systems/packagefs/PackageLinkSymlink.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageLinkSymlink.h
	src/add-ons/kernel/file_systems/packagefs/PackageLinksDirectory.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageNode.h
	src/add-ons/kernel/file_systems/packagefs/ResolvableFamily.cpp
	src/add-ons/kernel/file_systems/packagefs/Version.cpp
	src/add-ons/kernel/file_systems/packagefs/Version.h
	src/add-ons/kernel/file_systems/packagefs/Volume.cpp
	src/add-ons/kernel/file_systems/packagefs/Volume.h
	src/add-ons/kernel/file_systems/packagefs/kernel_interface.cpp
	src/add-ons/kernel/file_systems/userlandfs/shared/driver_settings.c
	src/apps/deskbar/BarApp.cpp
	src/apps/deskbar/BarMenuBar.cpp
	src/apps/deskbar/BarMenuBar.h
	src/apps/deskbar/BarView.cpp
	src/apps/deskbar/BarView.h
	src/apps/deskbar/BarWindow.cpp
	src/apps/deskbar/BarWindow.h
	src/apps/deskbar/DeskbarMenu.cpp
	src/apps/deskbar/DeskbarMenu.h
	src/apps/deskbar/DeskbarUtils.cpp
	src/apps/deskbar/DeskbarUtils.h
	src/apps/deskbar/ExpandoMenuBar.cpp
	src/apps/deskbar/ExpandoMenuBar.h
	src/apps/deskbar/TeamMenu.cpp
	src/apps/processcontroller/ProcessController.cpp
	src/apps/remotedesktop/RemoteDesktop.cpp
	src/bin/bash/config-top.h
	src/bin/finddir.c
	src/bin/package/Jamfile
	src/bin/package/command_add.cpp
	src/bin/package/command_create.cpp
	src/bin/package/command_list.cpp
	src/bin/package_repo/command_list.cpp
	src/bin/pkgman/command_refresh.cpp
	src/build/libbe/support/Jamfile
	src/build/libpackage/Jamfile
	src/build/libroot/Jamfile
	src/build/libroot/fs.cpp
	src/build/libroot/remapped_functions.h
	src/kits/locale/MutableLocaleRoster.cpp
	src/kits/opengl/GLRendererRoster.cpp
	src/kits/package/PackageInfo.cpp
	src/kits/package/PackageInfoSet.cpp
	src/kits/package/PackageRoster.cpp
	src/kits/package/PackageVersion.cpp
	src/kits/package/RepositoryCache.cpp
	src/kits/package/hpkg/PackageWriterImpl.cpp
	src/kits/package/hpkg/ReaderImplBase.cpp
	src/kits/package/hpkg/WriterImplBase.cpp
	src/kits/print/PrintTransport.cpp
	src/kits/print/Printer.cpp
	src/kits/screensaver/ScreenSaverRunner.cpp
	src/kits/support/StringList.cpp
	src/kits/tracker/ContainerWindow.cpp
	src/kits/tracker/DeskWindow.cpp
	src/kits/tracker/PoseView.cpp
	src/libs/print/libprint/Transport.cpp
	src/preferences/printers/AddPrinterDialog.cpp
	src/preferences/screensaver/ScreenSaverWindow.cpp
	src/servers/debug/DebugServer.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/media_addon/MediaAddonServer.cpp
	src/system/boot/Jamfile
	src/system/boot/loader/Jamfile
	src/system/boot/loader/loader.cpp
	src/system/boot/loader/vfs.cpp
	src/system/kernel/fs/vfs.cpp
	src/system/kernel/fs/vfs_boot.cpp
	src/system/libroot/os/find_directory.cpp
	src/system/runtime_loader/runtime_loader.cpp
	src/tools/package/Jamfile
2013-05-05 15:03:26 +02:00
Ingo Weinhold cf0a957ff6 BMessage: Add {Add,Find}Strings()
They add a BStringList to/extract it from a B_STRING_TYPE field.
2013-04-20 00:29:24 +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
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 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 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
Axel Dörfler a2f6e5ac9c Added missing BMessage::{Get|Set}String() methods.
* Forgot to add those before accidentally.
2012-11-12 23:56:14 +01:00
Axel Dörfler 6e50e79e54 Added Get*()/Set*() methods like the ones from KMessage. 2012-11-03 11:54:21 +01:00
Axel Dörfler 87e7009019 Style cleanup. 2012-11-02 23:42:31 +01:00
Axel Dörfler 009fd25715 Added BMessage::Append(), and new(std::nothrow_t).
* Append() copies all fields from the specified message.
* The nothrow operator new allows you to add BMessages to a BObjectList.
2012-11-02 23:42:29 +01:00
czeidler 6c40fc5dfc Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server
2012-01-22 15:30:16 +13:00
Adrien Destugues 4ec6c3a042 Merge patch by plfiorini :
Some changes to the API for notifications.
	* Don't go through be_roster to send a notification, but use Notification->Send() instead.
	* Rename App to Group to make the purpose clearer

And some changes to the notification code itself:
	* Use the Notification class as the way to convey informations about a notification. Allows easier extension of this class
	* Code cleanup
	* Use of the layout kit for the notify window

Unfortunately, the latter part clashes quite a bit with the changes I already did to the notification window, so it's now quite broken. Working on that next, but I wanted to separate that work from the patch ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 14:57:43 +00:00
Ingo Weinhold 54cf3a72ba Changed sReplyPortInUse type from long to int32, so it be used with
atomic_add() also on 64 bit architectures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 11:25:37 +00:00
Ingo Weinhold eff23a8157 Added missing header <Size.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 01:25:51 +00:00
Stephan Aßmus 2b52661315 Added another GetInfo() variant with which one can retrieve the count and
fixed size flag at once. Not sure if this can be merged into one of the
existing GetInfo() variants without breaking binary compatibility.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-07 20:10:14 +00:00
Ingo Weinhold e492be3195 Added versions of the constructors that take a const BMessage& instead of a
pointer. Allows for passing a temporary object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-17 23:23:09 +00:00
Ingo Weinhold 8aabb37b49 Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-17 23:18:08 +00:00
Clemens Zeidler da1c93175d Revert r39462 because it was not really binary compatible.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-17 22:19:09 +00:00
Clemens Zeidler a5cf354a27 Add protected RestoreState, SaveState functions to BApplication. HasBeenRestored can be used to check in ReadyToRun if the RestoreState function has been called. The default implementation just store the window geometry and the decorator settings. Subclass implementations can use the global restore_window_geometry, save_window_geometry function for convenience. Please review. Will commit a simple session manager tomorrow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-17 04:38:48 +00:00
Oliver Tappe 1195f511e5 * style adjustments - no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 16:47:14 +00:00
Stephan Aßmus b1008df2c2 Patch by Alex Wilson: Added convenience methods for storing BAlignment and BSize
in BMessages. Also added type codes for them in TypeConstants.h. Closes ticket
#6302. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 07:02:38 +00:00
Ingo Weinhold e5150e2847 Patch by Alex Wilson (compilation fixes by myself): Extended the archiving/
unarchiving protocol to support archival of arbitrary object graphs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 14:54:25 +00:00
Wim van der Meer 15676f3a87 Code style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 03:07:18 +00:00
Axel Dörfler d48edac1a6 * Should fix #6132, PropertyInfo.h was not self contained.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37027 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-06 09:37:46 +00:00
Stephan Aßmus 908967a199 Improved the BNotification API after suggestions from Karsten, thanks! Using
cosnt BString& instead of const char* could potentially save copying the string,
although in most use cases, it will probably ammount to the same thing. It may
provide more flexibility later on, like for example when BString knows its
encoding or something similar. Removed superfluous second version of
AddOnClickRef().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 21:13:11 +00:00
Stephan Aßmus f33637d9a8 * Improved BNotification API.
- No more manual memory management.
   - Make it clear who keeps or releases ownership of arguments passed.
   - Copy icon, arguments and entry_refs.
   - Do not expose implementation details (What do the BLists contain?!).
   - BRoster takes const BNotification& and bigtime_t timeout.

 * BRoster::Notify():
   - Proper error handling.
   - Fixed documentation.

 * Adjusted notify:
   - Renamed fOk to fHasGoodArguments.
   - The "const char*" members were really "char*" members (self-managed).
   - free() is NULL-safe.
   - fRefs contains BEntries, so passing void* to delete does no good.
   - Adjustments to the changed API.
   - Coding style fixes.

 * notification_server:
   - Adjustment to the new type for timeout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 17:50:12 +00:00
Axel Dörfler 0cf9610449 * Fixed incorrect spacing and blank lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 15:53:35 +00:00
Stephan Aßmus de9dcd41f8 Patch by plfiorini: Integration of InfoPopper as a system service. See ticket
#1245. There are some TODOs outlined in the ticket, but they will be much
easier to review as individual patches against trunk, versus as a new version
of the huge patch.

I've messed a lot with src/servers/notification/NotificationsView.cpp in order
to resolve a crash I was getting when testing this thing (rewrote line
wrapping). I've also replaced the icons with the one that zuMi did long ago.

Thanks, plfiorini, for working on this code as much as you did!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 14:48:27 +00:00
Stephan Aßmus b809ff1c59 * Tweaked the thumbsize of the pointing hand cursors.
* Repurposed the FollowLink cursor as CreateLink cursor.
 * Created a new FollowLink cursor based on a design by Justin Stressman, thanks!

It compiles and I proof-read the commit, otherwise I didn't test, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-20 14:23:42 +00:00
Stephan Aßmus 2318b47802 Indentation update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-13 17:55:17 +00:00
Stephan Aßmus e59dc33e21 * Added BCursorID enumeration in App Kit's Cursor.h and new constructor which
takes such an id.
 * Reused the existing mechanism to to have hardcoded tokens for the system
   cursors, i.e. removed cursor_which enumeration from ServerProtocol.h and
   used BCursorID where cursor_which was previously used.
 * Reworked CursorManager.h and CursorSet.h accordingly and removed some methods
   that where intended to replace system cursors with client cursors, since
   those would break the reference counting and forget to maintain the cursor
   list.
 * Replaced the cursors in CursorData.h/cpp with the new ones I just designed.
 * Removed HaikuSystemCursor.h and HaikuLogo.h from the source, as those are/were
   no longer used.

I hope I will not get too much beating for this one... :-) I know the new
default cursor is slightly larger, but I believe the old one was just too small.
Also I noticed that the cursor may be slightly too dark, at least the old one
seems noticeably brighter when compared side by side (the new one has a slight
gradient). That is something I may correct at least. Otherwise I hope nothing
is broken, I've tested in QEMU and so far everything works as intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-07 23:12:34 +00:00