Merge branch 'master' of git://github.com/haiku/haiku

This commit is contained in:
Alex Wilson
2011-12-15 20:50:28 -07:00
4732 changed files with 115256 additions and 42332 deletions
+87
View File
@@ -32,9 +32,12 @@ typedef unsigned long haiku_build_addr_t;
#include <Errors.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -91,6 +94,90 @@ extern char* _haiku_build_strerror(int errnum);
#endif // BUILDING_HAIKU_ERROR_MAPPER
// remap file descriptor functions
int _haiku_build_fchmod(int fd, mode_t mode);
int _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag);
int _haiku_build_fstat(int fd, struct stat* st);
int _haiku_build_fstatat(int fd, const char* path, struct stat* st,
int flag);
int _haiku_build_mkdirat(int fd, const char* path, mode_t mode);
int _haiku_build_mkfifoat(int fd, const char* path, mode_t mode);
int _haiku_build_utimensat(int fd, const char* path,
const struct timespec times[2], int flag);
int _haiku_build_futimens(int fd, const struct timespec times[2]);
int _haiku_build_faccessat(int fd, const char* path, int accessMode,
int flag);
int _haiku_build_fchdir(int fd);
int _haiku_build_close(int fd);
int _haiku_build_dup(int fd);
int _haiku_build_dup2(int fd1, int fd2);
int _haiku_build_linkat(int toFD, const char* toPath, int pathFD,
const char* path, int flag);
int _haiku_build_unlinkat(int fd, const char* path, int flag);
ssize_t _haiku_build_readlinkat(int fd, const char* path, char* buffer,
size_t bufferSize);
int _haiku_build_symlinkat(const char* toPath, int fd,
const char* symlinkPath);
int _haiku_build_ftruncate(int fd, off_t newSize);
int _haiku_build_fchown(int fd, uid_t owner, gid_t group);
int _haiku_build_fchownat(int fd, const char* path, uid_t owner,
gid_t group, int flag);
int _haiku_build_mknodat(int fd, const char* name, mode_t mode, dev_t dev);
int _haiku_build_creat(const char* path, mode_t mode);
#ifndef _HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS
int _haiku_build_open(const char* path, int openMode, ...);
int _haiku_build_openat(int fd, const char* path, int openMode, ...);
int _haiku_build_fcntl(int fd, int op, ...);
#else
int _haiku_build_open(const char* path, int openMode, mode_t permissions);
int _haiku_build_openat(int fd, const char* path, int openMode,
mode_t permissions);
int _haiku_build_fcntl(int fd, int op, int argument);
#endif
int _haiku_build_renameat(int fromFD, const char* from, int toFD,
const char* to);
#ifndef _HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS
# define fchmod(fd, mode) _haiku_build_fchmod(fd, mode)
# define fchmodat(fd, path, mode, flag) \
_haiku_build_fchmodat(fd, path, mode, flag)
# define fstat(fd, st) _haiku_build_fstat(fd, st)
# define fstatat(fd, path, st, flag) _haiku_build_fstatat(fd, path, st, flag)
# define mkdirat(fd, path, mode) _haiku_build_mkdirat(fd, path, mode)
# define mkfifoat(fd, path, mode) _haiku_build_mkfifoat(fd, path, mode)
# define utimensat(fd, path, times, flag) \
_haiku_build_utimensat(fd, path, times, flag)
# define futimens(fd, times) _haiku_build_futimens(fd, times)
# define faccessat(fd, path, accessMode, flag) \
_haiku_build_faccessat(fd, path, accessMode, flag)
# define fchdir(fd) _haiku_build_fchdir(fd)
# define close(fd) _haiku_build_close(fd)
# define dup(fd) _haiku_build_dup(fd)
# define dup2(fd1, fd2) _haiku_build_dup2(fd1, fd2)
# define linkat(toFD, toPath, pathFD, path, flag) \
_haiku_build_linkat(toFD, toPath, pathFD, path, flag)
# define unlinkat(fd, path, flag) _haiku_build_unlinkat(fd, path, flag)
# define readlinkat(fd, path, buffer, bufferSize) \
_haiku_build_readlinkat(fd, path, buffer, bufferSize)
# define symlinkat(toPath, fd, symlinkPath) \
_haiku_build_symlinkat(toPath, fd, symlinkPath)
# define ftruncate(fd, newSize) _haiku_build_ftruncate(fd, newSize)
# define fchown(fd, owner, group) _haiku_build_fchown(fd, owner, group)
# define fchownat(fd, path, owner, group, flag) \
_haiku_build_fchownat(fd, path, owner, group, flag)
# define mknodat(fd, name, mode, dev) \
_haiku_build_mknodat(fd, name, mode, dev)
# define creat(path, mode) _haiku_build_creat(path, mode)
# define open(path, openMode...) _haiku_build_open(path, openMode)
# define openat(fd, path, openMode...) \
_haiku_build_openat(fd, path, openMode)
# define fcntl(fd, op...) _haiku_build_fcntl(fd, op)
# define renameat(fromFD, from, toFD, to) \
_haiku_build_renameat(fromFD, from, toFD, to)
#endif // _HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS
#ifdef __cplusplus
} // extern "C"
#endif
+1 -1
View File
@@ -23,7 +23,7 @@
/* Maximum length of a multibyte character. */
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 1
#define MB_LEN_MAX 16
#endif
/* Minimum and maximum values a `signed char' can hold. */
+31
View File
@@ -0,0 +1,31 @@
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
#include_next <sys/stat.h>
#include <sys/cdefs.h>
#ifndef UTIME_NOW
# define UTIME_NOW (-1)
# define UTIME_OMIT (-2)
__BEGIN_DECLS
/* assume that futimens() and utimensat() aren't available */
int futimens(int fd, const struct timespec times[2]);
int utimensat(int fd, const char* path, const struct timespec times[2],
int flag);
__END_DECLS
# ifndef _HAIKU_BUILD_NO_FUTIMENS
# define _HAIKU_BUILD_NO_FUTIMENS 1
# endif
# ifndef _HAIKU_BUILD_NO_UTIMENSAT
# define _HAIKU_BUILD_NO_UTIMENSAT 1
# endif
#endif
#endif /* _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT */
+28 -1
View File
@@ -1 +1,28 @@
#include <../os/app/Looper.h>
/*
* Copyright 2011, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _LOOPER_H
#define _LOOPER_H
#include <OS.h>
// Port (Message Queue) Capacity
#define B_LOOPER_PORT_DEFAULT_CAPACITY 200
class BLooper {
public:
BLooper(const char* name = NULL,
int32 priority = B_NORMAL_PRIORITY,
int32 port_capacity
= B_LOOPER_PORT_DEFAULT_CAPACITY);
bool Lock() { return true; }
void Unlock() {}
};
#endif // _LOOPER_H
+14 -11
View File
@@ -1,7 +1,7 @@
/* File System attributes
**
** Distributed under the terms of the OpenBeOS License.
*/
/*
* Copyright 2002-2009, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FS_ATTR_H
#define _FS_ATTR_H
@@ -20,15 +20,18 @@ typedef struct attr_info {
extern "C" {
#endif
extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type, off_t pos, void *buffer, size_t readBytes);
extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type, off_t pos, const void *buffer, size_t readBytes);
extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type,
off_t pos, void *buffer, size_t readBytes);
extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type,
off_t pos, const void *buffer, size_t readBytes);
extern int fs_remove_attr(int fd, const char *attribute);
extern int fs_stat_attr(int fd, const char *attribute, struct attr_info *attrInfo);
extern int fs_stat_attr(int fd, const char *attribute,
struct attr_info *attrInfo);
// ToDo: the following three functions are not part of the R5 API, and
// are only preliminary - they may change or be removed at any point
//extern int fs_open_attr(const char *path, const char *attribute, uint32 type, int openMode);
extern int fs_open_attr(int fd, const char *attribute, uint32 type, int openMode);
extern int fs_open_attr(const char *path, const char *attribute,
uint32 type, int openMode);
extern int fs_fopen_attr(int fd, const char *attribute, uint32 type,
int openMode);
extern int fs_close_attr(int fd);
extern DIR *fs_open_attr_dir(const char *path);
@@ -0,0 +1 @@
#include <../os/package/AddRepositoryRequest.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/Attributes.h>
@@ -0,0 +1 @@
#include <../os/package/BlockBufferCacheNoLock.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/Context.h>
@@ -0,0 +1 @@
#include <../os/package/DropRepositoryRequest.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/Job.h>
@@ -0,0 +1 @@
#include <../os/package/PackageArchitecture.h>
+2
View File
@@ -0,0 +1,2 @@
#include <../os/package/PackageDefs.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/PackageFlags.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/PackageInfo.h>
@@ -0,0 +1 @@
#include <../os/package/PackageInfoAttributes.h>
@@ -0,0 +1 @@
#include <../os/package/PackageInfoContentHandler.h>
@@ -0,0 +1,2 @@
#include <../os/package/PackageInfoSet.h>
@@ -0,0 +1 @@
#include <../os/package/PackageResolvable.h>
@@ -0,0 +1 @@
#include <../os/package/PackageResolvableExpression.h>
@@ -0,0 +1 @@
#include <../os/package/PackageResolvableOperator.h>
@@ -0,0 +1 @@
#include <../os/package/PackageResolvableType.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/PackageRoster.h>
@@ -0,0 +1 @@
#include <../os/package/PackageVersion.h>
@@ -0,0 +1 @@
#include <../os/package/RefreshRepositoryRequest.h>
@@ -0,0 +1 @@
#include <../os/package/RepositoryCache.h>
@@ -0,0 +1 @@
#include <../os/package/RepositoryConfig.h>
@@ -0,0 +1 @@
#include <../os/package/RepositoryInfo.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/Request.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/BlockBufferCache.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/BufferCache.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/DataOutput.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/DataReader.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/ErrorOutput.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/package/hpkg/HPKGDefs.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageAttributeValue.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageContentHandler.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageData.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageDataReader.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageEntry.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageEntryAttribute.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageInfoAttributeValue.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageReader.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/PackageWriter.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/RepositoryContentHandler.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/RepositoryReader.h>
@@ -0,0 +1 @@
#include <../os/package/hpkg/RepositoryWriter.h>
+1
View File
@@ -12,6 +12,7 @@
#include <DataIO.h>
#include <Node.h>
#include <StorageDefs.h>
/*!
+1 -2
View File
@@ -1,4 +1,4 @@
/*
/*
* Copyright 2004-2006, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
@@ -31,7 +31,6 @@ status_t create_app_meta_mime(const char *path, int recursive, int synchronous,
status_t get_device_icon(const char *dev, void *icon, int32 size);
static const uint32 B_MIME_STRING_TYPE = 'MIMS';
enum icon_size {
B_LARGE_ICON = 32,
+1
View File
@@ -0,0 +1 @@
#include <../os/support/Autolock.h>
+1
View File
@@ -0,0 +1 @@
#include <../os/support/StringList.h>
@@ -0,0 +1 @@
#include <../private/kernel/util/DoublyLinkedList.h>
@@ -0,0 +1 @@
#include <../private/kernel/util/OpenHashTable.h>
@@ -0,0 +1 @@
#include <../private/kernel/util/SinglyLinkedList.h>
@@ -0,0 +1 @@
#include <../private/package/ActivateRepositoryCacheJob.h>
@@ -0,0 +1 @@
#include <../private/package/ActivateRepositoryConfigJob.h>
@@ -0,0 +1 @@
#include <../private/package/ChecksumAccessors.h>
@@ -0,0 +1 @@
#include <../private/package/FetchFileJob.h>
@@ -0,0 +1 @@
#include <../private/package/HashableString.h>
+1
View File
@@ -0,0 +1 @@
#include <../private/package/JobQueue.h>
@@ -0,0 +1 @@
#include <../private/package/RemoveRepositoryJob.h>
@@ -0,0 +1 @@
#include <../private/package/TempfileManager.h>
@@ -0,0 +1 @@
#include <../private/package/ValidateChecksumJob.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/BlockBufferCacheImpl.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/CachedBuffer.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/HPKGDefsPrivate.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/PackageReaderImpl.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/PackageWriterImpl.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/ReaderImplBase.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/RepositoryReaderImpl.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/RepositoryWriterImpl.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/Stacker.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/Strings.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/WriterImplBase.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/ZlibCompressionBase.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/ZlibCompressor.h>
@@ -0,0 +1 @@
#include <../private/package/hpkg/ZlibDecompressor.h>
+1
View File
@@ -0,0 +1 @@
#include <../private/shared/Array.h>
+1
View File
@@ -0,0 +1 @@
#include <../private/shared/HashMap.h>
+1
View File
@@ -0,0 +1 @@
#include <../private/shared/HashSet.h>
@@ -0,0 +1 @@
#include <../private/shared/HashString.h>
@@ -0,0 +1 @@
#include <../private/shared/NaturalCompare.h>
@@ -0,0 +1 @@
#include <../private/shared/RangeArray.h>
+1
View File
@@ -0,0 +1 @@
#include <../private/shared/SHA256.h>
@@ -0,0 +1 @@
#include <../private/support/StringPrivate.h>
@@ -0,0 +1 @@
#include <../private/system/directories.h>
+11
View File
@@ -9,6 +9,7 @@
/* Determine the architecture and define macros for some fundamental
properties:
__HAIKU_ARCH - short name of the architecture (used in paths)
__HAIKU_ARCH_ABI - name of ABI (as in package architecture)
__HAIKU_ARCH_<arch> - defined to 1 for the respective architecture
__HAIKU_ARCH_BITS - defined to 32/64 on 32/64 bit architectures
(defaults to 32)
@@ -19,25 +20,35 @@
*/
#ifdef __INTEL__
# define __HAIKU_ARCH x86
# if __GNUC__ == 2
# define __HAIKU_ARCH_ABI "x86_gcc2"
# else
# define __HAIKU_ARCH_ABI "x86"
# endif
# define __HAIKU_ARCH_X86 1
# define __HAIKU_ARCH_PHYSICAL_BITS 64
#elif __x86_64__
# define __HAIKU_ARCH x86_64
# define __HAIKU_ARCH_ABI "x86_64"
# define __HAIKU_ARCH_X86_64 1
# define __HAIKU_ARCH_BITS 64
#elif __POWERPC__
# define __HAIKU_ARCH ppc
# define __HAIKU_ARCH_ABI "ppc"
# define __HAIKU_ARCH_PPC 1
# define __HAIKU_BIG_ENDIAN 1
#elif __M68K__
# define __HAIKU_ARCH m68k
# define __HAIKU_ARCH_ABI "m68k"
# define __HAIKU_ARCH_M68K 1
# define __HAIKU_BIG_ENDIAN 1
#elif __MIPSEL__
# define __HAIKU_ARCH mipsel
# define __HAIKU_ARCH_ABI "mipsel"
# define __HAIKU_ARCH_MIPSEL 1
#elif __ARM__
# define __HAIKU_ARCH arm
# define __HAIKU_ARCH_ABI "arm"
# define __HAIKU_ARCH_ARM 1
#else
# error Unsupported architecture!
+6
View File
@@ -407,7 +407,13 @@ public:
int compare (const basic_string& str, size_type pos = 0, size_type n = npos) const;
// There is no 'strncmp' equivalent for charT pointers.
// BeOS bogus version
int compare (const charT* s, size_type pos, size_type n) const;
// Correct std C++ prototype
int compare (size_type pos, size_type n, const charT* s) const
{ return compare(s, pos, n); }
int compare (const charT* s, size_type pos = 0) const
{ return compare (s, pos, traits::length (s)); }
+18 -8
View File
@@ -35,12 +35,16 @@ public:
BALMLayout* friendLayout = NULL);
virtual ~BALMLayout();
XTab* AddXTab();
YTab* AddYTab();
BReference<XTab> AddXTab();
BReference<YTab> AddYTab();
int32 CountXTabs() const;
int32 CountYTabs() const;
XTab* XTabAt(int32 index) const;
YTab* YTabAt(int32 index) const;
/*! Order the tab list and return a reference to the list. */
const XTabList& OrderedXTabs();
const YTabList& OrderedYTabs();
Row* AddRow(YTab* top, YTab* bottom);
Column* AddColumn(XTab* left, XTab* right);
@@ -104,6 +108,7 @@ public:
YTab* bottom = NULL);
virtual Area* AddItem(BLayoutItem* item, Row* row,
Column* column);
virtual Area* AddItemToRight(BLayoutItem* item,
XTab* right = NULL, YTab* top = NULL,
YTab* bottom = NULL);
@@ -130,6 +135,9 @@ protected:
virtual void DoLayout();
private:
friend class XTab;
friend class YTab;
/*! Add a view without initialize the Area. */
BLayoutItem* _CreateLayoutItem(BView* view);
@@ -139,16 +147,18 @@ private:
BSize _CalculateMaxSize();
BSize _CalculatePreferredSize();
void _ParseGroupItem(GroupItem& item, XTab* left,
YTab* top, XTab* right, YTab* bottom);
void _ParseGroupItem(GroupItem& item,
BReference<XTab> left, BReference<YTab> top,
BReference<XTab> right,
BReference<YTab> bottom);
LinearSpec* fSolver;
LinearSpec fOwnSolver;
XTab* fLeft;
XTab* fRight;
YTab* fTop;
YTab* fBottom;
BReference<XTab> fLeft;
BReference<XTab> fRight;
BReference<YTab> fTop;
BReference<YTab> fBottom;
BSize fMinSize;
BSize fMaxSize;
BSize fPreferredSize;
+6 -6
View File
@@ -103,8 +103,8 @@ public:
void InvalidateSizeConstraints();
BRect Frame();
BRect ItemFrame();
BRect Frame() const;
BRect ItemFrame() const;
private:
Area(BLayoutItem* item);
@@ -124,10 +124,10 @@ private:
LinearSpec* fLS;
XTab* fLeft;
XTab* fRight;
YTab* fTop;
YTab* fBottom;
BReference<XTab> fLeft;
BReference<XTab> fRight;
BReference<YTab> fTop;
BReference<YTab> fBottom;
Row* fRow;
Column* fColumn;
+2 -2
View File
@@ -33,8 +33,8 @@ private:
Column(LinearSpec* ls, XTab* left, XTab* right);
LinearSpec* fLS;
XTab* fLeft;
XTab* fRight;
BReference<XTab> fLeft;
BReference<XTab> fRight;
//! managed by RowColumnManager
Constraint* fPrefSizeConstraint;
+2 -2
View File
@@ -33,8 +33,8 @@ private:
Row(LinearSpec* ls, YTab* top, YTab* bottom);
LinearSpec* fLS;
YTab* fTop;
YTab* fBottom;
BReference<YTab> fTop;
BReference<YTab> fBottom;
//! managed by RowColumnManager
Constraint* fPrefSizeConstraint;
+22 -18
View File
@@ -6,6 +6,7 @@
#define X_TAB_H
#include <Referenceable.h>
#include "LinearSpec.h"
#include "Variable.h"
@@ -13,34 +14,37 @@
namespace BALM {
class BALMLayout;
/**
* Vertical grid line (x-tab).
*/
class XTab : public Variable {
protected:
XTab(LinearSpec* ls)
:
Variable(ls)
{
}
class XTab : public Variable, public BReferenceable {
public:
virtual ~XTab();
friend class BALMLayout;
protected:
XTab(BALMLayout* layout);
private:
BALMLayout* fALMLayout;
};
class YTab : public Variable {
protected:
YTab(LinearSpec* ls)
:
Variable(ls)
{
}
class YTab : public Variable, public BReferenceable {
public:
virtual ~YTab();
friend class BALMLayout;
protected:
YTab(BALMLayout* layout);
private:
BALMLayout* fALMLayout;
};
+6
View File
@@ -39,6 +39,8 @@
#define B_HAIKU_ABI_GCC_2_BEOS 0x00020001
#define B_HAIKU_ABI_GCC_2_HAIKU 0x00020002
#define B_HAIKU_ABI_NAME __HAIKU_ARCH_ABI
#if __GNUC__ == 2
# define B_HAIKU_ABI B_HAIKU_ABI_GCC_2_HAIKU
#elif __GNUC__ == 4
@@ -78,4 +80,8 @@
#define B_DEFINE_SYMBOL_VERSION(function, versionedSymbol) \
__asm__(".symver " function "," versionedSymbol)
#define B_DEFINE_WEAK_ALIAS(name, alias_name) \
__typeof(name) alias_name __attribute__((weak, alias(#name)))
#endif /* _BE_BUILD_H */
@@ -1,73 +0,0 @@
#ifndef ZOIDBERG_STRING_LIST_H
#define ZOIDBERG_STRING_LIST_H
/* StringList - a string list implementation
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
#include <Flattenable.h>
class BList;
class BStringList : public BFlattenable {
public:
BStringList();
BStringList(const BStringList&);
~BStringList(void);
BStringList &operator=(const BStringList &from);
/* Flattenable stuff */
virtual bool IsFixedSize() const; //--false for obvious reasons
virtual type_code TypeCode() const;
virtual ssize_t FlattenedSize() const;
virtual status_t Flatten(void *buffer, ssize_t size) const;
virtual bool AllowsTypeCode(type_code code) const;
virtual status_t Unflatten(type_code c, const void *buf, ssize_t size);
/* Adding and removing items. */
void AddItem(const char *item);
void AddList(const BStringList *newItems);
bool RemoveItem(const char *item);
void MakeEmpty();
/* Retrieving items. */
const char *ItemAt(int32) const;
int32 IndexOf(const char *) const;
/* Querying the list. */
bool HasItem(const char *item) const;
int32 CountItems() const;
bool IsEmpty() const;
/* Determining differences between lists */
void NotHere(BStringList &other_list, BStringList *results);
void NotThere(BStringList &other_list, BStringList *results);
/* Useful list logic operators */
BStringList &operator += (const char *item);
BStringList &operator += (BStringList &list);
BStringList &operator -= (const char *item);
BStringList &operator -= (BStringList &list);
BStringList operator | (BStringList &list);
BStringList &operator |= (BStringList &list);
BStringList operator ^ (BStringList &list);
BStringList &operator ^= (BStringList &list);
bool operator == (BStringList &list);
const char *operator [] (int32 index);
private:
void *_buckets[256];
int32 _items;
BList *_indexed;
uint32 _reserved[5];
};
#endif /* ZOIDBERG_STRING_LIST_H */
+16 -5
View File
@@ -6,6 +6,7 @@
#define _NOTIFICATION_H
#include <Archivable.h>
#include <Entry.h>
#include <List.h>
#include <String.h>
@@ -22,15 +23,21 @@ enum notification_type {
class BBitmap;
class BNotification {
class BNotification : public BArchivable {
public:
BNotification(notification_type type);
~BNotification();
BNotification(BMessage* archive);
virtual ~BNotification();
status_t InitCheck() const;
static BArchivable* Instantiate(BMessage* archive);
virtual status_t Archive(BMessage* archive, bool deep = true) const;
notification_type Type() const;
const char* Application() const;
void SetApplication(const BString& app);
const char* Group() const;
void SetGroup(const BString& group);
const char* Title() const;
void SetTitle(const BString& title);
@@ -61,9 +68,13 @@ public:
const BBitmap* Icon() const;
status_t SetIcon(const BBitmap* icon);
status_t Send(bigtime_t timeout = -1);
private:
status_t fInitStatus;
notification_type fType;
BString fAppName;
BString fGroup;
BString fTitle;
BString fContent;
BString fID;
-5
View File
@@ -13,7 +13,6 @@
class BFile;
class BMimeType;
class BNodeInfo;
class BNotification;
struct app_info {
@@ -117,10 +116,6 @@ class BRoster {
void AddToRecentFolders(const entry_ref *folder,
const char *appSig = 0) const;
// notifications
status_t Notify(const BNotification& notification,
bigtime_t timeout = -1) const;
// private/reserved stuff starts here
class Private;
+16 -32
View File
@@ -1,51 +1,35 @@
/*******************************************************************************
/
/ File: NetPositive.h
/
/ Description: Defines all public APIs for communicating with NetPositive
/
/ Copyright 1998-1999, Be Incorporated, All Rights Reserved
/
*******************************************************************************/
/*
* Copyright 2011, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _NETPOSITIVE_H
#define _NETPOSITIVE_H
/*----------------------------------------------------------------*/
/*----- message command constants -------------------------------*/
// Message command constants
// These are not supported by WebPositive at this time and only exists for
// compile time backwards compatibility.
enum {
/* Can be sent to the NetPositive application, a window, or a replicant */
/* view. Put the URL in a String field named be:url */
// This message could be sent to the NetPositive application, a window, or a
// replicant view. The receiver expected the URL in a "be:url" string field.
B_NETPOSITIVE_OPEN_URL = 'NPOP',
/* Can be sent to a window or replicant view */
// These commands could be sent to a window or replicant view.
B_NETPOSITIVE_BACK = 'NPBK',
B_NETPOSITIVE_FORWARD = 'NPFW',
B_NETPOSITIVE_HOME = 'NPHM',
B_NETPOSITIVE_RELOAD = 'NPRL',
B_NETPOSITIVE_STOP = 'NPST',
B_NETPOSITIVE_STOP = 'NPST',
B_NETPOSITIVE_DOWN = 'NPDN',
B_NETPOSITIVE_UP = 'NPUP'
};
/*----------------------------------------------------------------*/
/*----- NetPositive-related MIME types --------------------------*/
/* The MIME types for the NetPositive application and its bookmark files */
// NetPositive related MIME types
// The first one is useless on Haiku, unless NetPositive was manually installed,
// the second one is still used for URL files saved by WebPositive.
#define B_NETPOSITIVE_APP_SIGNATURE "application/x-vnd.Be-NPOS"
#define B_NETPOSITIVE_BOOKMARK_SIGNATURE "application/x-vnd.Be-bookmark"
/* To set up your application to receive notification when the user */
/* clicks on a specific type of URL (telnet URL's, for example), see the */
/* details in TypeConstants.h. NetPositive will use external handlers */
/* for all URL types except for http, https, file, netpositive, and */
/* javascript, which it always handles internally. To maintain */
/* compatibility with its previous behavior, if NetPositive does not */
/* find a handler for mailto URL's, it will instead launch the handler */
/* for "text/x-email". */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
#endif /* _NETPOSITIVE_H */
#endif // _NETPOSITIVE_H
+2 -3
View File
@@ -38,8 +38,7 @@ enum {
#define B_MAX_ISA_DMA_COUNT 0x10000
typedef struct isa_module_info isa_module_info;
struct isa_module_info {
typedef struct isa_module_info {
bus_manager_info binfo;
uint8 (*read_io_8) (int mapped_io_addr);
@@ -73,7 +72,7 @@ struct isa_module_info {
);
long (*lock_isa_dma_channel) (long channel);
long (*unlock_isa_dma_channel) (long channel);
};
} isa_module_info;
#define B_ISA_MODULE_NAME "bus_managers/isa/v1"
+27 -77
View File
@@ -1,97 +1,47 @@
/*******************************************************************************
/
/ File: atomizer.h
/
/ Description: Kernel atomizer module API
/
/ Copyright 1999, Be Incorporated, All Rights Reserved.
/
*******************************************************************************/
#ifndef _ATOMIZER_MODULE_H_
#define _ATOMIZER_MODULE_H_
/*
* Copyright 2010, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _ATOMIZER_H
#define _ATOMIZER_H
#include <SupportDefs.h>
#include <module.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
An atomizer is a software device that returns a unique token for a
null-terminated UTF8 string.
Each atomizer comprises a separate token space. The same string interned
in two different atomizers will generate two distinct tokens.
#define B_ATOMIZER_MODULE_NAME "generic/atomizer/v1"
#define B_SYSTEM_ATOMIZER_NAME "Haiku System Atomizer"
Atomizers and the tokens they generate are only guaranteed valid between
matched calls to get_module/put_module.
void * find_or_make_atomizer(const char *string)
Returns a token that identifies the named atomizer, creating a new
atomizer if the named atomizer does not exist. Pass null, a zero
length string, or the value B_SYSTEM_ATOMIZER_NAME for string will
return a pointer to the system atomizer. Returns (void *)(0)
if the atomizer could not be created (for whatever reason). A return
value of (void *)(-1) refers to the system atomizer.
status_t delete_atomizer(void *atomizer)
Delete the atomizer specified. Returns B_OK if successfull, B_ERROR
otherwise. An error return usually means that a race condition was
detected while destroying the atomizer.
void * atomize(void *atomizer, const char *string, int create)
Return the unique token for the specified string, creating a new token
if the string was not previously atomized and create is non-zero. If
atomizer is (void *)(-1), use the system atomizer (saving the step of
looking it up with find_or_make_atomizer(). Returns (const char *)(0)
if there were any errors detected: insufficient memory or a race
condition with someone deleting the atomizer.
const char * string_for_token(void *atomizer, void *atom)
Return a pointer to the string described by atom in the provided atomizer.
Returns (const char *)(0) if either the atomizer or the atom were invalid.
status_t get_next_atomizer_info(void **cookie, atomizer_info *info)
Returns info about the next atomizer in the list of atomizers by modifying
the contents of info. The pointer specified by *cookie should be set to
(void *)(0) to retrieve the first atomizer, and should not be modified
thereafter. Returns B_ERROR when there are no more atomizers.
Adding or deleting atomizers between calls to get_next_atomizer() results
in a safe but undefined behavior.
void * get_next_atom(void *atomizer, uint32 *cookie)
Returns the next atom interned in specified atomizer, *cookie
should be set to (uint32)(0) to get the first atom. Returns
(void *)(0) when there are no more atoms. Adding atoms between
calls to get_next_atom() may cause atoms to be skipped.
Atomizers are SMP-safe. Check return codes for errors!
*/
#define B_ATOMIZER_MODULE_NAME "generic/atomizer/v1"
#define B_SYSTEM_ATOMIZER_NAME "BeOS System Atomizer"
typedef struct {
void *atomizer; /* An opaque token representing the atomizer. */
char name[B_OS_NAME_LENGTH]; /* The first B_OS_NAME_LENGTH bytes of the atomizer name, null terminated. */
uint32 atom_count; /* The number of atoms currently interned in this atomizer. */
typedef struct atomizer_info {
void* atomizer;
char name[B_OS_NAME_LENGTH];
uint32 atom_count;
} atomizer_info;
typedef struct {
typedef struct atomizer_module_info {
module_info minfo;
const void * (*find_or_make_atomizer)(const char *string);
status_t (*delete_atomizer)(const void *atomizer);
const void * (*atomize)(const void *atomizer, const char *string, int create);
const char * (*string_for_token)(const void * atomizer, const void *atom);
status_t (*get_next_atomizer_info)(void **cookie, atomizer_info *info);
const void * (*get_next_atom)(const void *atomizer, uint32 *cookie);
const void* (*find_or_make_atomizer)(const char* string);
status_t (*delete_atomizer)(const void* atomizer);
const void* (*atomize)
(const void* atomizer, const char* string, int create);
const char* (*string_for_token)
(const void* atomizer, const void* atom);
status_t (*get_next_atomizer_info)
(void** cookie, atomizer_info* info);
const void* (*get_next_atom)(const void* atomizer, uint32* cookie);
} atomizer_module_info;
#ifdef __cplusplus
}
#endif
#endif
#endif /* _ATOMIZER_H */

Some files were not shown because too many files have changed in this diff Show More