Merge branch 'master' into x86_64

Conflicts:
	build/jam/FloppyBootImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	headers/private/shared/cpu_type.h
	src/bin/ps.c
	src/bin/sysinfo.cpp
	src/kits/tracker/PoseView.cpp
	src/preferences/appearance/DecorSettingsView.cpp
	src/preferences/virtualmemory/Settings.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/input/InputServer.cpp
	src/servers/input/InputServerMethod.cpp
	src/system/boot/Jamfile
	src/system/boot/platform/raspberrypi_arm/mmu.cpp
	src/system/boot/platform/u-boot/arch/arm/Jamfile
	src/system/kernel/arch/x86/arch_cpu.cpp
	src/system/kernel/arch/x86/arch_thread.cpp
	src/system/kernel/cache/block_cache.cpp
	src/system/kernel/vm/VMAnonymousCache.cpp
This commit is contained in:
Alex Smith
2012-11-18 14:02:07 +00:00
3055 changed files with 94626 additions and 76544 deletions
+1 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2010 Haiku Inc. All Rights Reserved.
* Copyright 2006-2012 Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BSD_SYS_CDEFS_H_
@@ -12,10 +12,6 @@
#define __FBSDID(x)
#define __unused
#ifndef __cplusplus
# define protected
#endif
#define __printflike(a, b) __attribute__ ((format (__printf__, (a), (b))))
#define __printf0like(a, b)
+4 -1
View File
@@ -350,7 +350,10 @@ private:
public:
const charT* c_str () const
{ if (length () == 0) return ""; terminate (); return data (); }
{
static const charT null_str[1] = {0};
if (length () == 0) return null_str; terminate (); return data ();
}
void resize (size_type n, charT c);
void resize (size_type n)
{ resize (n, eos ()); }
+16
View File
@@ -387,6 +387,22 @@ template <class _FLT> complex<_FLT>
template <class _FLT> complex<_FLT>
sqrt (const complex<_FLT>&) __attribute__ ((const));
template <class _FLT> inline complex<_FLT>
tan (const complex<_FLT>& x)
{
return sin (x) / cos (x);
}
template <class _FLT> inline complex<_FLT>
tanh (const complex<_FLT>& x)
{
return sinh (x) / cosh (x);
}
template <class _FLT> inline complex<_FLT>
log10 (const complex<_FLT>& x)
{
return log (x) / log (10.0);
}
template <class _FLT> istream& operator >> (istream&, complex<_FLT>&);
template <class _FLT> ostream& operator << (ostream&, const complex<_FLT>&);
} // extern "C++"
+42 -3
View File
@@ -16,6 +16,8 @@
class BView;
class BLayoutItem;
class Constraint;
namespace BPrivate {
class SharedSolver;
@@ -53,10 +55,41 @@ public:
XTab* XTabAt(int32 index) const;
YTab* YTabAt(int32 index, bool ordered = false);
YTab* YTabAt(int32 index) const;
const XTabList GetXTabs() const;
const YTabList GetYTabs() const;
int32 IndexOf(XTab* tab, bool ordered = false);
int32 IndexOf(YTab* tab, bool ordered = false);
int32 CountConstraints() const;
Constraint* ConstraintAt(int32 index) const;
bool AddConstraint(Constraint* constraint);
bool RemoveConstraint(Constraint* constraint,
bool deleteConstraint = true);
Constraint* AddConstraint(double coeff1, Variable* var1,
OperatorType op, double rightSide,
double penaltyNeg = -1,
double penaltyPos = -1);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
OperatorType op, double rightSide,
double penaltyNeg = -1,
double penaltyPos = -1);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3,
OperatorType op, double rightSide,
double penaltyNeg = -1,
double penaltyPos = -1);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3,
double coeff4, Variable* var4,
OperatorType op, double rightSide,
double penaltyNeg = -1,
double penaltyPos = -1);
Row* AddRow(YTab* top, YTab* bottom);
Column* AddColumn(XTab* left, XTab* right);
@@ -66,6 +99,7 @@ public:
YTab* Bottom() const;
LinearProgramming::LinearSpec* Solver() const;
LinearProgramming::ResultType ValidateLayout();
void SetInsets(float insets);
void SetInsets(float x, float y);
@@ -106,9 +140,7 @@ public:
YTab* bottom = NULL);
virtual Area* AddItem(BLayoutItem* item, Row* row,
Column* column);
bool SaveLayout(BMessage* archive) const;
bool RestoreLayout(const BMessage* archive);
struct BadLayoutPolicy;
void SetBadLayoutPolicy(BadLayoutPolicy* policy);
@@ -192,6 +224,9 @@ private:
friend class YTab;
friend class Area;
class BALMLayoutSpecListener;
friend class BALMLayoutSpecListener;
float InsetForTab(XTab* tab) const;
float InsetForTab(YTab* tab) const;
@@ -208,6 +243,7 @@ private:
void _SetSolver(BPrivate::SharedSolver* solver);
BPrivate::SharedSolver* fSolver;
BALMLayoutSpecListener* fSpecListener;
BReference<XTab> fLeft;
BReference<XTab> fRight;
@@ -231,9 +267,12 @@ private:
YTabList fYTabList;
bool fYTabsSorted;
BObjectList<Constraint> fConstraints;
RowColumnManager* fRowColumnManager;
BadLayoutPolicy* fBadLayoutPolicy;
uint32 _reserved[5];
};
+4 -4
View File
@@ -56,10 +56,10 @@ public:
XTab* Right() const;
YTab* Top() const;
YTab* Bottom() const;
void SetLeft(XTab* left);
void SetRight(XTab* right);
void SetTop(YTab* top);
void SetBottom(YTab* bottom);
void SetLeft(BReference<XTab> left);
void SetRight(BReference<XTab> right);
void SetTop(BReference<YTab> top);
void SetBottom(BReference<YTab> bottom);
Row* GetRow() const;
Column* GetColumn() const;
+60
View File
@@ -0,0 +1,60 @@
#ifndef _FDT_H
#define _FDT_H
#ifndef __ASSEMBLY__
struct fdt_header {
uint32_t magic; /* magic word FDT_MAGIC */
uint32_t totalsize; /* total size of DT block */
uint32_t off_dt_struct; /* offset to structure */
uint32_t off_dt_strings; /* offset to strings */
uint32_t off_mem_rsvmap; /* offset to memory reserve map */
uint32_t version; /* format version */
uint32_t last_comp_version; /* last compatible version */
/* version 2 fields below */
uint32_t boot_cpuid_phys; /* Which physical CPU id we're
booting on */
/* version 3 fields below */
uint32_t size_dt_strings; /* size of the strings block */
/* version 17 fields below */
uint32_t size_dt_struct; /* size of the structure block */
};
struct fdt_reserve_entry {
uint64_t address;
uint64_t size;
};
struct fdt_node_header {
uint32_t tag;
char name[0];
};
struct fdt_property {
uint32_t tag;
uint32_t len;
uint32_t nameoff;
char data[0];
};
#endif /* !__ASSEMBLY */
#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
#define FDT_TAGSIZE sizeof(uint32_t)
#define FDT_BEGIN_NODE 0x1 /* Start node: full name */
#define FDT_END_NODE 0x2 /* End node */
#define FDT_PROP 0x3 /* Property: name off,
size, content */
#define FDT_NOP 0x4 /* nop */
#define FDT_END 0x9
#define FDT_V1_SIZE (7*sizeof(uint32_t))
#define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(uint32_t))
#define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(uint32_t))
#define FDT_V16_SIZE FDT_V3_SIZE
#define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(uint32_t))
#endif /* _FDT_H */
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
#ifndef _LIBFDT_ENV_H
#define _LIBFDT_ENV_H
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#define _B(n) ((unsigned long long)((uint8_t *)&x)[n])
static inline uint32_t fdt32_to_cpu(uint32_t x)
{
return (_B(0) << 24) | (_B(1) << 16) | (_B(2) << 8) | _B(3);
}
#define cpu_to_fdt32(x) fdt32_to_cpu(x)
static inline uint64_t fdt64_to_cpu(uint64_t x)
{
return (_B(0) << 56) | (_B(1) << 48) | (_B(2) << 40) | (_B(3) << 32)
| (_B(4) << 24) | (_B(5) << 16) | (_B(6) << 8) | _B(7);
}
#define cpu_to_fdt64(x) fdt64_to_cpu(x)
#undef _B
#endif /* _LIBFDT_ENV_H */
+95
View File
@@ -0,0 +1,95 @@
#ifndef _LIBFDT_INTERNAL_H
#define _LIBFDT_INTERNAL_H
/*
* libfdt - Flat Device Tree manipulation
* Copyright (C) 2006 David Gibson, IBM Corporation.
*
* libfdt is dual licensed: you can use it either under the terms of
* the GPL, or the BSD license, at your option.
*
* a) This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Alternatively,
*
* b) Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* 1. Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <fdt.h>
#define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
#define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))
#define FDT_CHECK_HEADER(fdt) \
{ \
int err; \
if ((err = fdt_check_header(fdt)) != 0) \
return err; \
}
int _fdt_check_node_offset(const void *fdt, int offset);
int _fdt_check_prop_offset(const void *fdt, int offset);
const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
int _fdt_node_end_offset(void *fdt, int nodeoffset);
static inline const void *_fdt_offset_ptr(const void *fdt, int offset)
{
return (const char *)fdt + fdt_off_dt_struct(fdt) + offset;
}
static inline void *_fdt_offset_ptr_w(void *fdt, int offset)
{
return (void *)(uintptr_t)_fdt_offset_ptr(fdt, offset);
}
static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n)
{
const struct fdt_reserve_entry *rsv_table =
(const struct fdt_reserve_entry *)
((const char *)fdt + fdt_off_mem_rsvmap(fdt));
return rsv_table + n;
}
static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n)
{
return (void *)(uintptr_t)_fdt_mem_rsv(fdt, n);
}
#define FDT_SW_MAGIC (~FDT_MAGIC)
#endif /* _LIBFDT_INTERNAL_H */
+13 -21
View File
@@ -6,9 +6,6 @@
#ifndef CONSTRAINT_H
#define CONSTRAINT_H
#include <math.h>
#include <File.h>
#include <ObjectList.h>
#include <String.h>
#include <SupportDefs.h>
@@ -28,20 +25,26 @@ class LinearSpec;
*/
class Constraint {
public:
Constraint();
/*! Creates a soft copy of the constraint which is not connected
to the solver. Variables are not copied or cloned but the soft copy
has its own summand list with summands. */
Constraint(Constraint* constraint);
int32 Index() const;
SummandList* LeftSide();
/*! This just overwrites the current list. The caller has to take
care about the old left side, i.e. delete it. */
void SetLeftSide(SummandList* summands);
bool SetLeftSide(SummandList* summands,
bool deleteOldSummands);
void SetLeftSide(double coeff1, Variable* var1);
void SetLeftSide(double coeff1, Variable* var1,
bool SetLeftSide(double coeff1, Variable* var1);
bool SetLeftSide(double coeff1, Variable* var1,
double coeff2, Variable* var2);
void SetLeftSide(double coeff1, Variable* var1,
bool SetLeftSide(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3);
void SetLeftSide(double coeff1, Variable* var1,
bool SetLeftSide(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3,
double coeff4, Variable* var4);
@@ -58,11 +61,6 @@ public:
const char* Label();
void SetLabel(const char* label);
Variable* DNeg() const;
Variable* DPos() const;
bool IsSoft() const;
bool IsValid();
void Invalidate();
@@ -86,16 +84,10 @@ private:
double fPenaltyNeg;
double fPenaltyPos;
Summand* fDNegObjSummand;
Summand* fDPosObjSummand;
BString fLabel;
bool fIsValid;
public:
friend class LinearSpec;
friend class LPSolveInterface;
};
+48 -33
View File
@@ -7,9 +7,7 @@
#ifndef LINEAR_SPEC_H
#define LINEAR_SPEC_H
#include <math.h>
#include <List.h>
#include <ObjectList.h>
#include <OS.h>
#include <Referenceable.h>
#include <Size.h>
@@ -36,7 +34,7 @@ class SolverInterface {
public:
SolverInterface(LinearSpec* linSpec);
virtual ~SolverInterface() {}
virtual ~SolverInterface();
virtual ResultType Solve() = 0;
@@ -49,12 +47,10 @@ public:
virtual bool LeftSideChanged(Constraint* constraint) = 0;
virtual bool RightSideChanged(Constraint* constraint) = 0;
virtual bool OperatorChanged(Constraint* constraint) = 0;
virtual bool PenaltiesChanged(Constraint* constraint) = 0;
virtual bool SaveModel(const char* fileName) = 0;
virtual BSize MinSize(Variable* width, Variable* height) = 0;
virtual BSize MaxSize(Variable* width, Variable* height) = 0;
virtual ResultType FindMins(const VariableList* variables) = 0;
virtual ResultType FindMaxs(const VariableList* variables) = 0;
@@ -63,10 +59,26 @@ public:
const Constraint** _max) const = 0;
protected:
bool AddConstraint(Constraint* constraint,
bool notifyListener);
bool RemoveConstraint(Constraint* constraint,
bool deleteConstraint, bool notifyListener);
LinearSpec* fLinearSpec;
};
class SpecificationListener {
public:
virtual ~SpecificationListener();
virtual void VariableAdded(Variable* variable);
virtual void VariableRemoved(Variable* variable);
virtual void ConstraintAdded(Constraint* constraint);
virtual void ConstraintRemoved(Constraint* constraint);
};
/*!
* Specification of a linear programming problem.
*/
@@ -75,6 +87,10 @@ public:
LinearSpec();
virtual ~LinearSpec();
/*! Does not takes ownership of the listener. */
bool AddListener(SpecificationListener* listener);
bool RemoveListener(SpecificationListener* listener);
Variable* AddVariable();
bool AddVariable(Variable* variable);
bool RemoveVariable(Variable* variable,
@@ -87,47 +103,32 @@ public:
bool RemoveConstraint(Constraint* constraint,
bool deleteConstraint = true);
Constraint* AddConstraint(SummandList* summands,
OperatorType op, double rightSide);
Constraint* AddConstraint(double coeff1, Variable* var1,
OperatorType op, double rightSide);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
OperatorType op, double rightSide);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3,
OperatorType op, double rightSide);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3,
double coeff4, Variable* var4,
OperatorType op, double rightSide);
Constraint* AddConstraint(SummandList* summands,
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
double penaltyNeg = -1,
double penaltyPos = -1);
Constraint* AddConstraint(double coeff1, Variable* var1,
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
double penaltyNeg = -1,
double penaltyPos = -1);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
double penaltyNeg = -1,
double penaltyPos = -1);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3,
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
double penaltyNeg = -1,
double penaltyPos = -1);
Constraint* AddConstraint(double coeff1, Variable* var1,
double coeff2, Variable* var2,
double coeff3, Variable* var3,
double coeff4, Variable* var4,
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
BSize MinSize(Variable* width, Variable* height);
BSize MaxSize(Variable* width, Variable* height);
double penaltyNeg = -1,
double penaltyPos = -1);
ResultType FindMins(const VariableList* variables);
ResultType FindMaxs(const VariableList* variables);
@@ -151,9 +152,18 @@ public:
protected:
friend class Constraint;
bool UpdateLeftSide(Constraint* constraint);
friend class SolverInterface;
bool UpdateLeftSide(Constraint* constraint,
const SummandList* oldSummands);
bool UpdateRightSide(Constraint* constraint);
bool UpdateOperator(Constraint* constraint);
bool UpdatePenalties(Constraint* constraint);
bool AddConstraint(Constraint* constraint,
bool notifyListener);
bool RemoveConstraint(Constraint* constraint,
bool deleteConstraint, bool notifyListener);
private:
/*! Check if all entries != NULL otherwise delete the list and its
entries. */
@@ -162,6 +172,9 @@ private:
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
void _AddConstraintRef(Variable* var);
void _RemoveConstraintRef(Variable* var);
VariableList fVariables;
VariableList fUsedVariables;
ConstraintList fConstraints;
@@ -169,6 +182,8 @@ private:
bigtime_t fSolvingTime;
SolverInterface* fSolver;
BObjectList<SpecificationListener> fListeners;
};
} // namespace LinearProgramming
+1 -1
View File
@@ -19,6 +19,7 @@ class Variable;
*/
class Summand {
public:
Summand(Summand* summand);
Summand(double coeff, Variable* var);
~Summand();
@@ -31,7 +32,6 @@ public:
private:
double fCoeff;
Variable* fVar;
bool fUsedInPenaltyFunction; //not set yet
};
typedef BObjectList<Summand> SummandList;
+5 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2007-2010, Haiku, Inc. All Rights Reserved.
* Copyright 2007-2012, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BE_BUILD_H
@@ -25,10 +25,12 @@
#define B_HAIKU_VERSION_1_ALPHA_2 0x00000200
#define B_HAIKU_VERSION_1_PRE_ALPHA_3 0x00000201
#define B_HAIKU_VERSION_1_ALPHA_3 0x00000300
#define B_HAIKU_VERSION_1_PRE_BETA_1 0x00000301
#define B_HAIKU_VERSION_1_PRE_ALPHA_4 0x00000301
#define B_HAIKU_VERSION_1_ALPHA_4 0x00000400
#define B_HAIKU_VERSION_1_PRE_BETA_1 0x00000401
#define B_HAIKU_VERSION_1 0x00010000
#define B_HAIKU_VERSION B_HAIKU_VERSION_1_PRE_BETA_1
#define B_HAIKU_VERSION B_HAIKU_VERSION_1_PRE_ALPHA_4
/* Haiku ABI */
#define B_HAIKU_ABI_MAJOR 0xffff0000
+479 -291
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2010, Haiku Inc. All Rights Reserved.
* Copyright 2005-2012, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -9,6 +9,8 @@
#define _MESSAGE_H
#include <new>
#include <BeBuild.h>
#include <DataIO.h>
#include <Flattenable.h>
@@ -19,6 +21,7 @@
#include <AppDefs.h> /* For convenience */
#include <TypeConstants.h> /* For convenience */
class BAlignment;
class BBlockCache;
class BMessenger;
@@ -45,341 +48,526 @@ enum {
// app-defined specifiers start at B_SPECIFIERS_END + 1
};
class BMessage {
public:
uint32 what;
public:
uint32 what;
BMessage();
BMessage(uint32 what);
BMessage(const BMessage &other);
virtual ~BMessage();
BMessage();
BMessage(uint32 what);
BMessage(const BMessage& other);
virtual ~BMessage();
BMessage &operator=(const BMessage &other);
BMessage& operator=(const BMessage& other);
// Statistics and misc info
status_t GetInfo(type_code typeRequested, int32 index,
char **nameFound, type_code *typeFound,
int32 *countFound = NULL) const;
status_t GetInfo(const char *name, type_code *typeFound,
int32 *countFound = NULL) const;
status_t GetInfo(const char *name, type_code *typeFound,
bool *fixedSize) const;
status_t GetInfo(const char *name, type_code *typeFound,
int32 *countFound, bool *fixedSize) const;
// Statistics and misc info
status_t GetInfo(type_code typeRequested, int32 index,
char** nameFound, type_code* typeFound,
int32* countFound = NULL) const;
status_t GetInfo(const char* name, type_code* typeFound,
int32* countFound = NULL) const;
status_t GetInfo(const char* name, type_code* typeFound,
bool* fixedSize) const;
status_t GetInfo(const char* name, type_code* typeFound,
int32* countFound, bool* fixedSize) const;
int32 CountNames(type_code type) const;
bool IsEmpty() const;
bool IsSystem() const;
bool IsReply() const;
void PrintToStream() const;
int32 CountNames(type_code type) const;
bool IsEmpty() const;
bool IsSystem() const;
bool IsReply() const;
void PrintToStream() const;
status_t Rename(const char *oldEntry, const char *newEntry);
status_t Rename(const char* oldEntry,
const char* newEntry);
// Delivery info
bool WasDelivered() const;
bool IsSourceWaiting() const;
bool IsSourceRemote() const;
BMessenger ReturnAddress() const;
const BMessage *Previous() const;
bool WasDropped() const;
BPoint DropPoint(BPoint *offset = NULL) const;
// Delivery info
bool WasDelivered() const;
bool IsSourceWaiting() const;
bool IsSourceRemote() const;
BMessenger ReturnAddress() const;
const BMessage* Previous() const;
bool WasDropped() const;
BPoint DropPoint(BPoint* offset = NULL) const;
// Replying
status_t SendReply(uint32 command, BHandler *replyTo = NULL);
status_t SendReply(BMessage *reply, BHandler *replyTo = NULL,
bigtime_t timeout = B_INFINITE_TIMEOUT);
status_t SendReply(BMessage *reply, BMessenger replyTo,
bigtime_t timeout = B_INFINITE_TIMEOUT);
// Replying
status_t SendReply(uint32 command,
BHandler* replyTo = NULL);
status_t SendReply(BMessage* reply,
BHandler* replyTo = NULL,
bigtime_t timeout = B_INFINITE_TIMEOUT);
status_t SendReply(BMessage* reply, BMessenger replyTo,
bigtime_t timeout = B_INFINITE_TIMEOUT);
status_t SendReply(uint32 command, BMessage *replyToReply);
status_t SendReply(BMessage *the_reply, BMessage *replyToReply,
bigtime_t sendTimeout = B_INFINITE_TIMEOUT,
bigtime_t replyTimeout = B_INFINITE_TIMEOUT);
status_t SendReply(uint32 command,
BMessage* replyToReply);
status_t SendReply(BMessage* reply,
BMessage* replyToReply,
bigtime_t sendTimeout = B_INFINITE_TIMEOUT,
bigtime_t replyTimeout
= B_INFINITE_TIMEOUT);
// Flattening data
ssize_t FlattenedSize() const;
status_t Flatten(char *buffer, ssize_t size) const;
status_t Flatten(BDataIO *stream, ssize_t *size = NULL) const;
status_t Unflatten(const char *flatBuffer);
status_t Unflatten(BDataIO *stream);
// Flattening data
ssize_t FlattenedSize() const;
status_t Flatten(char* buffer, ssize_t size) const;
status_t Flatten(BDataIO* stream,
ssize_t* size = NULL) const;
status_t Unflatten(const char* flatBuffer);
status_t Unflatten(BDataIO* stream);
// Specifiers (scripting)
status_t AddSpecifier(const char *property);
status_t AddSpecifier(const char *property, int32 index);
status_t AddSpecifier(const char *property, int32 index, int32 range);
status_t AddSpecifier(const char *property, const char *name);
status_t AddSpecifier(const BMessage *specifier);
// Specifiers (scripting)
status_t AddSpecifier(const char* property);
status_t AddSpecifier(const char* property, int32 index);
status_t AddSpecifier(const char* property, int32 index,
int32 range);
status_t AddSpecifier(const char* property,
const char* name);
status_t AddSpecifier(const BMessage* specifier);
status_t SetCurrentSpecifier(int32 index);
status_t GetCurrentSpecifier(int32 *index,
BMessage *specifier = NULL, int32 *what = NULL,
const char **property = NULL) const;
bool HasSpecifiers() const;
status_t PopSpecifier();
status_t SetCurrentSpecifier(int32 index);
status_t GetCurrentSpecifier(int32* index,
BMessage* specifier = NULL,
int32* what = NULL,
const char** property = NULL) const;
bool HasSpecifiers() const;
status_t PopSpecifier();
// Adding data
status_t AddAlignment(const char* name,
const BAlignment& alignment);
status_t AddRect(const char *name, BRect aRect);
status_t AddPoint(const char *name, BPoint aPoint);
status_t AddSize(const char* name, BSize aSize);
status_t AddString(const char *name, const char *aString);
status_t AddString(const char *name, const BString &aString);
status_t AddInt8(const char *name, int8 value);
status_t AddUInt8(const char *name, uint8 value);
status_t AddInt16(const char *name, int16 value);
status_t AddUInt16(const char *name, uint16 value);
status_t AddInt32(const char *name, int32 value);
status_t AddUInt32(const char *name, uint32 value);
status_t AddInt64(const char *name, int64 value);
status_t AddUInt64(const char *name, uint64 value);
status_t AddBool(const char *name, bool aBoolean);
status_t AddFloat(const char *name, float aFloat);
status_t AddDouble(const char *name, double aDouble);
status_t AddPointer(const char *name, const void *aPointer);
status_t AddMessenger(const char *name, BMessenger messenger);
status_t AddRef(const char *name, const entry_ref *ref);
status_t AddMessage(const char *name, const BMessage *message);
status_t AddFlat(const char *name, BFlattenable *object,
int32 count = 1);
status_t AddData(const char *name, type_code type,
const void *data, ssize_t numBytes,
bool isFixedSize = true, int32 count = 1);
// Adding data
status_t AddAlignment(const char* name,
const BAlignment& alignment);
status_t AddRect(const char* name, BRect rect);
status_t AddPoint(const char* name, BPoint point);
status_t AddSize(const char* name, BSize size);
status_t AddString(const char* name, const char* string);
status_t AddString(const char* name,
const BString& string);
status_t AddInt8(const char* name, int8 value);
status_t AddUInt8(const char* name, uint8 value);
status_t AddInt16(const char* name, int16 value);
status_t AddUInt16(const char* name, uint16 value);
status_t AddInt32(const char* name, int32 value);
status_t AddUInt32(const char* name, uint32 value);
status_t AddInt64(const char* name, int64 value);
status_t AddUInt64(const char* name, uint64 value);
status_t AddBool(const char* name, bool value);
status_t AddFloat(const char* name, float value);
status_t AddDouble(const char* name, double value);
status_t AddPointer(const char* name,
const void* pointer);
status_t AddMessenger(const char* name,
BMessenger messenger);
status_t AddRef(const char* name, const entry_ref* ref);
status_t AddMessage(const char* name,
const BMessage* message);
status_t AddFlat(const char* name, BFlattenable* object,
int32 count = 1);
status_t AddData(const char* name, type_code type,
const void* data, ssize_t numBytes,
bool isFixedSize = true, int32 count = 1);
// Removing data
status_t RemoveData(const char *name, int32 index = 0);
status_t RemoveName(const char *name);
status_t MakeEmpty();
status_t Append(const BMessage& message);
// Finding data
status_t FindAlignment(const char* name,
BAlignment* alignment) const;
status_t FindAlignment(const char* name, int32 index,
BAlignment* alignment) const;
// Removing data
status_t RemoveData(const char* name, int32 index = 0);
status_t RemoveName(const char* name);
status_t MakeEmpty();
status_t FindRect(const char *name, BRect *rect) const;
status_t FindRect(const char *name, int32 index, BRect *rect) const;
status_t FindPoint(const char *name, BPoint *point) const;
status_t FindPoint(const char *name, int32 index, BPoint *point) const;
// Finding data
status_t FindAlignment(const char* name,
BAlignment* alignment) const;
status_t FindAlignment(const char* name, int32 index,
BAlignment* alignment) const;
status_t FindSize(const char *name, BSize* size) const;
status_t FindSize(const char *name,
int32 index, BSize* size) const;
status_t FindRect(const char* name, BRect* rect) const;
status_t FindRect(const char* name, int32 index,
BRect* rect) const;
status_t FindPoint(const char* name,
BPoint* point) const;
status_t FindPoint(const char* name, int32 index,
BPoint* point) const;
status_t FindString(const char *name, const char **string) const;
status_t FindString(const char *name, int32 index, const char **string) const;
status_t FindString(const char *name, BString *string) const;
status_t FindString(const char *name, int32 index, BString *string) const;
status_t FindInt8(const char *name, int8 *value) const;
status_t FindInt8(const char *name, int32 index, int8 *value) const;
status_t FindUInt8(const char *name, uint8 *value) const;
status_t FindUInt8(const char *name, int32 index, uint8 *value) const;
status_t FindInt16(const char *name, int16 *value) const;
status_t FindInt16(const char *name, int32 index, int16 *value) const;
status_t FindUInt16(const char *name, uint16 *value) const;
status_t FindUInt16(const char *name, int32 index, uint16 *value) const;
status_t FindInt32(const char *name, int32 *value) const;
status_t FindInt32(const char *name, int32 index, int32 *value) const;
status_t FindUInt32(const char *name, uint32 *value) const;
status_t FindUInt32(const char *name, int32 index, uint32 *value) const;
status_t FindInt64(const char *name, int64 *value) const;
status_t FindInt64(const char *name, int32 index, int64 *value) const;
status_t FindUInt64(const char *name, uint64 *value) const;
status_t FindUInt64(const char *name, int32 index, uint64 *value) const;
status_t FindBool(const char *name, bool *value) const;
status_t FindBool(const char *name, int32 index, bool *value) const;
status_t FindFloat(const char *name, float *value) const;
status_t FindFloat(const char *name, int32 index, float *value) const;
status_t FindDouble(const char *name, double *value) const;
status_t FindDouble(const char *name, int32 index, double *value) const;
status_t FindPointer(const char *name, void **pointer) const;
status_t FindPointer(const char *name, int32 index, void **pointer) const;
status_t FindMessenger(const char *name, BMessenger *messenger) const;
status_t FindMessenger(const char *name, int32 index, BMessenger *messenger) const;
status_t FindRef(const char *name, entry_ref *ref) const;
status_t FindRef(const char *name, int32 index, entry_ref *ref) const;
status_t FindMessage(const char *name, BMessage *message) const;
status_t FindMessage(const char *name, int32 index, BMessage *message) const;
status_t FindFlat(const char *name, BFlattenable *object) const;
status_t FindFlat(const char *name, int32 index, BFlattenable *object) const;
status_t FindData(const char *name, type_code type,
const void **data, ssize_t *numBytes) const;
status_t FindData(const char *name, type_code type, int32 index,
const void **data, ssize_t *numBytes) const;
status_t FindSize(const char* name, BSize* size) const;
status_t FindSize(const char* name, int32 index,
BSize* size) const;
// Replacing data
status_t ReplaceAlignment(const char* name,
const BAlignment& alignment);
status_t ReplaceAlignment(const char* name, int32 index,
const BAlignment& alignment);
status_t FindString(const char* name,
const char** string) const;
status_t FindString(const char* name, int32 index,
const char** string) const;
status_t FindString(const char* name,
BString* string) const;
status_t FindString(const char* name, int32 index,
BString* string) const;
status_t FindInt8(const char* name, int8* value) const;
status_t FindInt8(const char* name, int32 index,
int8* value) const;
status_t FindUInt8(const char* name, uint8* value) const;
status_t FindUInt8(const char* name, int32 index,
uint8* value) const;
status_t FindInt16(const char* name, int16* value) const;
status_t FindInt16(const char* name, int32 index,
int16* value) const;
status_t FindUInt16(const char* name,
uint16* value) const;
status_t FindUInt16(const char* name, int32 index,
uint16* value) const;
status_t FindInt32(const char* name, int32* value) const;
status_t FindInt32(const char* name, int32 index,
int32* value) const;
status_t FindUInt32(const char* name,
uint32* value) const;
status_t FindUInt32(const char* name, int32 index,
uint32* value) const;
status_t FindInt64(const char* name, int64* value) const;
status_t FindInt64(const char* name, int32 index,
int64* value) const;
status_t FindUInt64(const char* name,
uint64* value) const;
status_t FindUInt64(const char* name, int32 index,
uint64* value) const;
status_t FindBool(const char* name, bool* value) const;
status_t FindBool(const char* name, int32 index,
bool* value) const;
status_t FindFloat(const char* name, float* value) const;
status_t FindFloat(const char* name, int32 index,
float* value) const;
status_t FindDouble(const char* name,
double* value) const;
status_t FindDouble(const char* name, int32 index,
double* value) const;
status_t FindPointer(const char* name,
void** pointer) const;
status_t FindPointer(const char* name, int32 index,
void** pointer) const;
status_t FindMessenger(const char* name,
BMessenger* messenger) const;
status_t FindMessenger(const char* name, int32 index,
BMessenger* messenger) const;
status_t FindRef(const char* name, entry_ref* ref) const;
status_t FindRef(const char* name, int32 index,
entry_ref* ref) const;
status_t FindMessage(const char* name,
BMessage* message) const;
status_t FindMessage(const char* name, int32 index,
BMessage* message) const;
status_t FindFlat(const char* name,
BFlattenable* object) const;
status_t FindFlat(const char* name, int32 index,
BFlattenable* object) const;
status_t FindData(const char* name, type_code type,
const void** data, ssize_t* numBytes) const;
status_t FindData(const char* name, type_code type,
int32 index, const void** data,
ssize_t* numBytes) const;
status_t ReplaceRect(const char *name, BRect aRect);
status_t ReplaceRect(const char *name, int32 index, BRect aRect);
// Replacing data
status_t ReplaceAlignment(const char* name,
const BAlignment& alignment);
status_t ReplaceAlignment(const char* name, int32 index,
const BAlignment& alignment);
status_t ReplacePoint(const char *name, BPoint aPoint);
status_t ReplacePoint(const char *name, int32 index, BPoint aPoint);
status_t ReplaceSize(const char* name, BSize aSize);
status_t ReplaceSize(const char* name, int32 index, BSize aSize);
status_t ReplaceRect(const char* name, BRect rect);
status_t ReplaceRect(const char* name, int32 index,
BRect rect);
status_t ReplaceString(const char *name, const char *aString);
status_t ReplaceString(const char *name, int32 index, const char *aString);
status_t ReplaceString(const char *name, const BString &aString);
status_t ReplaceString(const char *name, int32 index, const BString &aString);
status_t ReplaceInt8(const char *name, int8 value);
status_t ReplaceInt8(const char *name, int32 index, int8 value);
status_t ReplaceUInt8(const char *name, uint8 value);
status_t ReplaceUInt8(const char *name, int32 index, uint8 value);
status_t ReplaceInt16(const char *name, int16 value);
status_t ReplaceInt16(const char *name, int32 index, int16 value);
status_t ReplaceUInt16(const char *name, uint16 value);
status_t ReplaceUInt16(const char *name, int32 index, uint16 value);
status_t ReplaceInt32(const char *name, int32 value);
status_t ReplaceInt32(const char *name, int32 index, int32 value);
status_t ReplaceUInt32(const char *name, uint32 value);
status_t ReplaceUInt32(const char *name, int32 index, uint32 value);
status_t ReplaceInt64(const char *name, int64 value);
status_t ReplaceInt64(const char *name, int32 index, int64 value);
status_t ReplaceUInt64(const char *name, uint64 value);
status_t ReplaceUInt64(const char *name, int32 index, uint64 value);
status_t ReplaceBool(const char *name, bool aBoolean);
status_t ReplaceBool(const char *name, int32 index, bool aBoolean);
status_t ReplaceFloat(const char *name, float aFloat);
status_t ReplaceFloat(const char *name, int32 index, float aFloat);
status_t ReplaceDouble(const char *name, double aDouble);
status_t ReplaceDouble(const char *name, int32 index, double aDouble);
status_t ReplacePointer(const char *name, const void *pointer);
status_t ReplacePointer(const char *name,int32 index,const void *pointer);
status_t ReplaceMessenger(const char *name, BMessenger messenger);
status_t ReplaceMessenger(const char *name, int32 index, BMessenger messenger);
status_t ReplaceRef( const char *name,const entry_ref *ref);
status_t ReplaceRef( const char *name, int32 index, const entry_ref *ref);
status_t ReplaceMessage(const char *name, const BMessage *message);
status_t ReplaceMessage(const char *name, int32 index, const BMessage *message);
status_t ReplaceFlat(const char *name, BFlattenable *object);
status_t ReplaceFlat(const char *name, int32 index, BFlattenable *object);
status_t ReplaceData(const char *name, type_code type,
const void *data, ssize_t numBytes);
status_t ReplaceData(const char *name, type_code type, int32 index,
const void *data, ssize_t numBytes);
status_t ReplacePoint(const char* name, BPoint aPoint);
status_t ReplacePoint(const char* name, int32 index,
BPoint aPoint);
status_t ReplaceSize(const char* name, BSize aSize);
status_t ReplaceSize(const char* name, int32 index,
BSize aSize);
// Comparing data - Haiku experimental API
bool HasSameData(const BMessage &other,
bool ignoreFieldOrder = true, bool deep = false) const;
status_t ReplaceString(const char* name,
const char* string);
status_t ReplaceString(const char* name, int32 index,
const char* string);
status_t ReplaceString(const char* name,
const BString& string);
status_t ReplaceString(const char* name, int32 index,
const BString& string);
status_t ReplaceInt8(const char* name, int8 value);
status_t ReplaceInt8(const char* name, int32 index,
int8 value);
status_t ReplaceUInt8(const char* name, uint8 value);
status_t ReplaceUInt8(const char* name, int32 index,
uint8 value);
status_t ReplaceInt16(const char* name, int16 value);
status_t ReplaceInt16(const char* name, int32 index,
int16 value);
status_t ReplaceUInt16(const char* name, uint16 value);
status_t ReplaceUInt16(const char* name, int32 index,
uint16 value);
status_t ReplaceInt32(const char* name, int32 value);
status_t ReplaceInt32(const char* name, int32 index,
int32 value);
status_t ReplaceUInt32(const char* name, uint32 value);
status_t ReplaceUInt32(const char* name, int32 index,
uint32 value);
status_t ReplaceInt64(const char* name, int64 value);
status_t ReplaceInt64(const char* name, int32 index,
int64 value);
status_t ReplaceUInt64(const char* name, uint64 value);
status_t ReplaceUInt64(const char* name, int32 index,
uint64 value);
status_t ReplaceBool(const char* name, bool aBoolean);
status_t ReplaceBool(const char* name, int32 index,
bool value);
status_t ReplaceFloat(const char* name, float value);
status_t ReplaceFloat(const char* name, int32 index,
float value);
status_t ReplaceDouble(const char* name, double value);
status_t ReplaceDouble(const char* name, int32 index,
double value);
status_t ReplacePointer(const char* name,
const void* pointer);
status_t ReplacePointer(const char* name, int32 index,
const void* pointer);
status_t ReplaceMessenger(const char* name,
BMessenger messenger);
status_t ReplaceMessenger(const char* name, int32 index,
BMessenger messenger);
status_t ReplaceRef(const char* name,
const entry_ref* ref);
status_t ReplaceRef(const char* name, int32 index,
const entry_ref* ref);
status_t ReplaceMessage(const char* name,
const BMessage* message);
status_t ReplaceMessage(const char* name, int32 index,
const BMessage* message);
status_t ReplaceFlat(const char* name,
BFlattenable* object);
status_t ReplaceFlat(const char* name, int32 index,
BFlattenable* object);
status_t ReplaceData(const char* name, type_code type,
const void* data, ssize_t numBytes);
status_t ReplaceData(const char* name, type_code type,
int32 index, const void* data,
ssize_t numBytes);
void *operator new(size_t size);
void *operator new(size_t, void *pointer);
void operator delete(void *pointer, size_t size);
// Comparing data - Haiku experimental API
bool HasSameData(const BMessage& other,
bool ignoreFieldOrder = true,
bool deep = false) const;
// Private, reserved, or obsolete
bool HasAlignment(const char*, int32 n = 0) const;
bool HasRect(const char *, int32 n = 0) const;
bool HasPoint(const char *, int32 n = 0) const;
bool HasSize(const char*, int32 n = 0) const;
bool HasString(const char *, int32 n = 0) const;
bool HasInt8(const char *, int32 n = 0) const;
bool HasUInt8(const char *, int32 n = 0) const;
bool HasInt16(const char *, int32 n = 0) const;
bool HasUInt16(const char *, int32 n = 0) const;
bool HasInt32(const char *, int32 n = 0) const;
bool HasUInt32(const char *, int32 n = 0) const;
bool HasInt64(const char *, int32 n = 0) const;
bool HasUInt64(const char *, int32 n = 0) const;
bool HasBool(const char *, int32 n = 0) const;
bool HasFloat(const char *, int32 n = 0) const;
bool HasDouble(const char *, int32 n = 0) const;
bool HasPointer(const char *, int32 n = 0) const;
bool HasMessenger(const char *, int32 n = 0) const;
bool HasRef(const char *, int32 n = 0) const;
bool HasMessage(const char *, int32 n = 0) const;
bool HasFlat(const char *, const BFlattenable *) const;
bool HasFlat(const char *, int32 n, const BFlattenable *) const;
bool HasData(const char *, type_code , int32 n = 0) const;
BRect FindRect(const char *, int32 n = 0) const;
BPoint FindPoint(const char *, int32 n = 0) const;
const char *FindString(const char *, int32 n = 0) const;
int8 FindInt8(const char *, int32 n = 0) const;
int16 FindInt16(const char *, int32 n = 0) const;
int32 FindInt32(const char *, int32 n = 0) const;
int64 FindInt64(const char *, int32 n = 0) const;
bool FindBool(const char *, int32 n = 0) const;
float FindFloat(const char *, int32 n = 0) const;
double FindDouble(const char *, int32 n = 0) const;
void* operator new(size_t size);
void* operator new(size_t, void* pointer);
void* operator new(size_t,
const std::nothrow_t& noThrow);
void operator delete(void* pointer, size_t size);
class Private;
struct message_header;
struct field_header;
// Private, reserved, or obsolete
bool HasAlignment(const char* name,
int32 n = 0) const;
bool HasRect(const char* name, int32 n = 0) const;
bool HasPoint(const char* name, int32 n = 0) const;
bool HasSize(const char* name, int32 n = 0) const;
bool HasString(const char* name, int32 n = 0) const;
bool HasInt8(const char* name, int32 n = 0) const;
bool HasUInt8(const char* name, int32 n = 0) const;
bool HasInt16(const char* name, int32 n = 0) const;
bool HasUInt16(const char* name, int32 n = 0) const;
bool HasInt32(const char* name, int32 n = 0) const;
bool HasUInt32(const char* name, int32 n = 0) const;
bool HasInt64(const char* name, int32 n = 0) const;
bool HasUInt64(const char* name, int32 n = 0) const;
bool HasBool(const char* name, int32 n = 0) const;
bool HasFloat(const char* name, int32 n = 0) const;
bool HasDouble(const char* name, int32 n = 0) const;
bool HasPointer(const char* name, int32 n = 0) const;
bool HasMessenger(const char* name,
int32 n = 0) const;
bool HasRef(const char* name, int32 n = 0) const;
bool HasMessage(const char* name, int32 n = 0) const;
bool HasFlat(const char* name,
const BFlattenable* object) const;
bool HasFlat(const char* name, int32 n,
const BFlattenable* object) const;
bool HasData(const char* name, type_code ,
int32 n = 0) const;
BRect FindRect(const char* name, int32 n = 0) const;
BPoint FindPoint(const char* name, int32 n = 0) const;
const char* FindString(const char* name, int32 n = 0) const;
int8 FindInt8(const char* name, int32 n = 0) const;
int16 FindInt16(const char* name, int32 n = 0) const;
int32 FindInt32(const char* name, int32 n = 0) const;
int64 FindInt64(const char* name, int32 n = 0) const;
bool FindBool(const char* name, int32 n = 0) const;
float FindFloat(const char* name, int32 n = 0) const;
double FindDouble(const char* name, int32 n = 0) const;
private:
friend class Private;
friend class BMessageQueue;
// Convenience methods
bool GetBool(const char* name,
bool defaultValue) const;
bool GetBool(const char* name, int32 index,
bool defaultValue) const;
int8 GetInt8(const char* name,
int8 defaultValue) const;
int8 GetInt8(const char* name, int32 index,
int8 defaultValue) const;
uint8 GetUInt8(const char* name,
uint8 defaultValue) const;
uint8 GetUInt8(const char* name, int32 index,
uint8 defaultValue) const;
int16 GetInt16(const char* name,
int16 defaultValue) const;
int16 GetInt16(const char* name, int32 index,
int16 defaultValue) const;
uint16 GetUInt16(const char* name,
uint16 defaultValue) const;
uint16 GetUInt16(const char* name, int32 index,
uint16 defaultValue) const;
int32 GetInt32(const char* name,
int32 defaultValue) const;
int32 GetInt32(const char* name, int32 index,
int32 defaultValue) const;
uint32 GetUInt32(const char* name,
uint32 defaultValue) const;
uint32 GetUInt32(const char* name, int32 index,
uint32 defaultValue) const;
int64 GetInt64(const char* name,
int64 defaultValue) const;
int64 GetInt64(const char* name, int32 index,
int64 defaultValue) const;
uint64 GetUInt64(const char* name,
uint64 defaultValue) const;
uint64 GetUInt64(const char* name, int32 index,
uint64 defaultValue) const;
float GetFloat(const char* name,
float defaultValue) const;
float GetFloat(const char* name, int32 index,
float defaultValue) const;
double GetDouble(const char* name,
double defaultValue) const;
double GetDouble(const char* name, int32 index,
double defaultValue) const;
void* GetPointer(const char* name,
const void* defaultValue) const;
void* GetPointer(const char* name, int32 index,
const void* defaultValue) const;
const char* GetString(const char* name,
const char* defaultValue) const;
const char* GetString(const char* name, int32 index,
const char* defaultValue) const;
BAlignment GetAlignment(const char* name, int32 index,
const BAlignment& defaultValue) const;
BAlignment GetAlignment(const char* name,
const BAlignment& defaultValue) const;
BRect GetRect(const char* name, int32 index,
const BRect& defaultValue) const;
BRect GetRect(const char* name,
const BRect& defaultValue) const;
BPoint GetPoint(const char* name, int32 index,
const BPoint& defaultValue) const;
BPoint GetPoint(const char* name,
const BPoint& defaultValue) const;
BSize GetSize(const char* name, int32 index,
const BSize& defaultValue) const;
BSize GetSize(const char* name,
const BSize& defaultValue) const;
status_t _InitCommon(bool initHeader);
status_t _InitHeader();
status_t _Clear();
// fixed size fields only
status_t SetBool(const char* name, bool value);
status_t SetInt8(const char* name, int8 value);
status_t SetUInt8(const char* name, uint8 value);
status_t SetInt16(const char* name, int16 value);
status_t SetUInt16(const char* name, uint16 value);
status_t SetInt32(const char* name, int32 value);
status_t SetUInt32(const char* name, uint32 value);
status_t SetInt64(const char* name, int64 value);
status_t SetUInt64(const char* name, uint64 value);
status_t SetPointer(const char* name, const void* value);
status_t SetString(const char* name, const char* string);
status_t SetString(const char* name,
const BString& string);
status_t SetFloat(const char* name, float value);
status_t SetDouble(const char* name, double value);
status_t SetAlignment(const char* name,
const BAlignment& value);
status_t SetPoint(const char* name, const BPoint& value);
status_t SetRect(const char* name, const BRect& value);
status_t SetSize(const char* name, const BSize& value);
status_t SetData(const char* name, type_code type,
const void* data, ssize_t numBytes);
status_t _FlattenToArea(message_header **_header) const;
status_t _CopyForWrite();
status_t _Reference();
status_t _Dereference();
class Private;
struct message_header;
struct field_header;
status_t _ValidateMessage();
private:
friend class Private;
friend class BMessageQueue;
status_t _ResizeData(uint32 offset, int32 change);
status_t _InitCommon(bool initHeader);
status_t _InitHeader();
status_t _Clear();
uint32 _HashName(const char* name) const;
status_t _FindField(const char* name, type_code type,
field_header** _result) const;
status_t _AddField(const char* name, type_code type,
bool isFixedSize, field_header** _result);
status_t _RemoveField(field_header* field);
status_t _FlattenToArea(message_header** _header) const;
status_t _CopyForWrite();
status_t _Reference();
status_t _Dereference();
void _PrintToStream(const char* indent) const;
status_t _ValidateMessage();
private:
message_header* fHeader;
field_header* fFields;
uint8* fData;
status_t _ResizeData(uint32 offset, int32 change);
uint32 fFieldsAvailable;
size_t fDataAvailable;
uint32 _HashName(const char* name) const;
status_t _FindField(const char* name, type_code type,
field_header** _result) const;
status_t _AddField(const char* name, type_code type,
bool isFixedSize, field_header** _result);
status_t _RemoveField(field_header* field);
mutable BMessage* fOriginal;
void _PrintToStream(const char* indent) const;
BMessage* fQueueLink;
// fQueueLink is used by BMessageQueue to build a linked list
private:
BMessage(BMessage* message);
// deprecated
void* fArchivingPointer;
virtual void _ReservedMessage1();
virtual void _ReservedMessage2();
virtual void _ReservedMessage3();
uint32 fReserved[8];
status_t _SendMessage(port_id port, team_id portOwner,
int32 token, bigtime_t timeout,
bool replyRequired,
BMessenger& replyTo) const;
status_t _SendMessage(port_id port, team_id portOwner,
int32 token, BMessage* reply,
bigtime_t sendTimeout,
bigtime_t replyTimeout) const;
static status_t _SendFlattenedMessage(void* data, int32 size,
port_id port, int32 token,
bigtime_t timeout);
// deprecated
BMessage(BMessage *message);
static void _StaticInit();
static void _StaticReInitForkedChild();
static void _StaticCleanup();
static void _StaticCacheCleanup();
static int32 _StaticGetCachedReplyPort();
virtual void _ReservedMessage1();
virtual void _ReservedMessage2();
virtual void _ReservedMessage3();
private:
message_header* fHeader;
field_header* fFields;
uint8* fData;
status_t _SendMessage(port_id port, team_id portOwner, int32 token,
bigtime_t timeout, bool replyRequired,
BMessenger &replyTo) const;
status_t _SendMessage(port_id port, team_id portOwner,
int32 token, BMessage *reply, bigtime_t sendTimeout,
bigtime_t replyTimeout) const;
static status_t _SendFlattenedMessage(void *data, int32 size,
port_id port, int32 token, bigtime_t timeout);
uint32 fFieldsAvailable;
size_t fDataAvailable;
static void _StaticInit();
static void _StaticReInitForkedChild();
static void _StaticCleanup();
static void _StaticCacheCleanup();
static int32 _StaticGetCachedReplyPort();
mutable BMessage* fOriginal;
enum { sNumReplyPorts = 3 };
static port_id sReplyPorts[sNumReplyPorts];
static int32 sReplyPortInUse[sNumReplyPorts];
static int32 sGetCachedReplyPort();
BMessage* fQueueLink;
// fQueueLink is used by BMessageQueue to build a linked list
static BBlockCache* sMsgCache;
void* fArchivingPointer;
uint32 fReserved[8];
enum { sNumReplyPorts = 3 };
static port_id sReplyPorts[sNumReplyPorts];
static int32 sReplyPortInUse[sNumReplyPorts];
static int32 sGetCachedReplyPort();
static BBlockCache* sMsgCache;
};
#endif // _MESSAGE_H
+9 -3
View File
@@ -115,11 +115,17 @@ struct hci_command_header {
} __attribute__ ((packed));
#define OCF_WRITE_PG_TIMEOUT 0x0018
#define OCF_READ_SCAN_ENABLE 0x0019
struct hci_read_scan_enable {
uint8 status;
uint8 enable;
} __attribute__ ((packed));
#define OCF_WRITE_SCAN_ENABLE 0x001A
#define HCI_SCAN_DISABLED 0x00
#define HCI_SCAN_INQUIRY 0x01
#define HCI_SCAN_PAGE 0x02
#define HCI_SCAN_INQUIRY_PAGE 0x03
#define HCI_SCAN_INQUIRY 0x01 //Page Scan disabled
#define HCI_SCAN_PAGE 0x02 //Inquiry Scan disabled
#define HCI_SCAN_INQUIRY_PAGE 0x03 //All enabled
struct hci_write_scan_enable {
uint8 scan;
} __attribute__ ((packed));
+1 -1
View File
@@ -255,7 +255,7 @@ struct acpi_module_info {
status_t (*prepare_sleep_state)(uint8 state, void (*wakeFunc)(void),
size_t size);
status_t (*enter_sleep_state)(uint8 state, uint8 flags);
status_t (*enter_sleep_state)(uint8 state);
status_t (*reboot)(void);
/* Table Access */
+14 -9
View File
@@ -306,27 +306,32 @@ enum color_which {
B_MENU_SELECTED_ITEM_TEXT_COLOR = 8,
B_MENU_SELECTED_BORDER_COLOR = 9,
B_LIST_BACKGROUND_COLOR = 28,
B_LIST_SELECTED_BACKGROUND_COLOR = 29,
B_LIST_ITEM_TEXT_COLOR = 30,
B_LIST_SELECTED_ITEM_TEXT_COLOR = 31,
B_TOOL_TIP_BACKGROUND_COLOR = 20,
B_TOOL_TIP_TEXT_COLOR = 21,
B_SUCCESS_COLOR = 100,
B_FAILURE_COLOR = 101,
// Old name synonyms.
B_KEYBOARD_NAVIGATION_COLOR = B_NAVIGATION_BASE_COLOR,
B_MENU_SELECTION_BACKGROUND_COLOR = B_MENU_SELECTED_BACKGROUND_COLOR,
// These are deprecated -- do not use in new code. See BScreen for
// the replacement for B_DESKTOP_COLOR.
B_DESKTOP_COLOR = 5,
B_WINDOW_TAB_COLOR = 3,
B_WINDOW_TEXT_COLOR = 22,
B_WINDOW_INACTIVE_TAB_COLOR = 23,
B_WINDOW_INACTIVE_TEXT_COLOR = 24,
B_WINDOW_BORDER_COLOR = 25,
B_WINDOW_INACTIVE_BORDER_COLOR = 26
B_WINDOW_INACTIVE_BORDER_COLOR = 26,
// Old name synonyms.
B_KEYBOARD_NAVIGATION_COLOR = B_NAVIGATION_BASE_COLOR,
B_MENU_SELECTION_BACKGROUND_COLOR = B_MENU_SELECTED_BACKGROUND_COLOR,
// These are deprecated -- do not use in new code. See BScreen for
// the replacement for B_DESKTOP_COLOR.
B_DESKTOP_COLOR = 5
};
+98 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2010, Haiku, Inc. All rights reserved.
* Copyright 2009-2012, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _LAYOUT_BUILDER_H
@@ -108,6 +108,11 @@ public:
inline ThisBuilder& SetInsets(float horizontal, float vertical);
inline ThisBuilder& SetInsets(float insets);
inline ThisBuilder& SetExplicitMinSize(BSize size);
inline ThisBuilder& SetExplicitMaxSize(BSize size);
inline ThisBuilder& SetExplicitPreferredSize(BSize size);
inline ThisBuilder& SetExplicitAlignment(BAlignment alignment);
inline operator BGroupLayout*();
private:
@@ -188,6 +193,9 @@ public:
int32 row, int32 columnCount = 1,
int32 rowCount = 1);
inline ThisBuilder& AddGlue(int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1);
inline ThisBuilder& SetColumnWeight(int32 column, float weight);
inline ThisBuilder& SetRowWeight(int32 row, float weight);
@@ -196,6 +204,11 @@ public:
inline ThisBuilder& SetInsets(float horizontal, float vertical);
inline ThisBuilder& SetInsets(float insets);
inline ThisBuilder& SetExplicitMinSize(BSize size);
inline ThisBuilder& SetExplicitMaxSize(BSize size);
inline ThisBuilder& SetExplicitPreferredSize(BSize size);
inline ThisBuilder& SetExplicitAlignment(BAlignment alignment);
inline operator BGridLayout*();
private:
@@ -604,6 +617,42 @@ Group<ParentBuilder>::SetInsets(float insets)
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::ThisBuilder&
Group<ParentBuilder>::SetExplicitMinSize(BSize size)
{
fLayout->SetExplicitMinSize(size);
return *this;
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::ThisBuilder&
Group<ParentBuilder>::SetExplicitMaxSize(BSize size)
{
fLayout->SetExplicitMaxSize(size);
return *this;
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::ThisBuilder&
Group<ParentBuilder>::SetExplicitPreferredSize(BSize size)
{
fLayout->SetExplicitPreferredSize(size);
return *this;
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::ThisBuilder&
Group<ParentBuilder>::SetExplicitAlignment(BAlignment alignment)
{
fLayout->SetExplicitAlignment(alignment);
return *this;
}
template<typename ParentBuilder>
Group<ParentBuilder>::operator BGroupLayout*()
{
@@ -833,6 +882,17 @@ Grid<ParentBuilder>::AddSplit(BSplitView* splitView, int32 column, int32 row,
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::AddGlue(int32 column, int32 row, int32 columnCount,
int32 rowCount)
{
fLayout->AddItem(BSpaceLayoutItem::CreateGlue(), column, row, columnCount,
rowCount);
return *this;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::SetColumnWeight(int32 column, float weight)
@@ -879,6 +939,42 @@ Grid<ParentBuilder>::SetInsets(float insets)
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::SetExplicitMinSize(BSize size)
{
fLayout->SetExplicitMinSize(size);
return *this;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::SetExplicitMaxSize(BSize size)
{
fLayout->SetExplicitMaxSize(size);
return *this;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::SetExplicitPreferredSize(BSize size)
{
fLayout->SetExplicitPreferredSize(size);
return *this;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::SetExplicitAlignment(BAlignment alignment)
{
fLayout->SetExplicitAlignment(alignment);
return *this;
}
template<typename ParentBuilder>
Grid<ParentBuilder>::operator BGridLayout*()
{
@@ -1232,7 +1328,7 @@ MenuItem<ParentBuilder>::MenuItem(ParentBuilder* parentBuilder, BMenu* menu,
Menu<ParentBuilder>(menu),
fMenuItem(item)
{
SetParent(parentBuilder);
this->SetParent(parentBuilder);
}
+1
View File
@@ -32,6 +32,7 @@ public:
virtual void SetExplicitMinSize(BSize size) = 0;
virtual void SetExplicitMaxSize(BSize size) = 0;
virtual void SetExplicitPreferredSize(BSize size) = 0;
void SetExplicitSize(BSize size);
virtual void SetExplicitAlignment(BAlignment alignment) = 0;
virtual bool IsVisible() = 0;
+10 -10
View File
@@ -1,16 +1,16 @@
/*
* Copyright 2001-2009, Haiku, Inc. All rights reserved.
* Copyright 2001-2012, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _RECT_H
#define _RECT_H
#include <math.h>
#include <Point.h>
#include <Size.h>
#include <math.h>
class BRect {
public:
@@ -54,16 +54,16 @@ public:
// Expression transformations
BRect& InsetBySelf(BPoint inset);
BRect& InsetBySelf(float dx, float dy);
BRect InsetByCopy(BPoint inset);
BRect InsetByCopy(float dx, float dy);
BRect InsetByCopy(BPoint inset) const;
BRect InsetByCopy(float dx, float dy) const;
BRect& OffsetBySelf(BPoint offset);
BRect& OffsetBySelf(float dx, float dy);
BRect OffsetByCopy(BPoint offset);
BRect OffsetByCopy(float dx, float dy);
BRect OffsetByCopy(BPoint offset) const;
BRect OffsetByCopy(float dx, float dy) const;
BRect& OffsetToSelf(BPoint offset);
BRect& OffsetToSelf(float dx, float dy);
BRect OffsetToCopy(BPoint offset);
BRect OffsetToCopy(float dx, float dy);
BRect OffsetToCopy(BPoint offset) const;
BRect OffsetToCopy(float dx, float dy) const;
// Comparison
bool operator==(BRect r) const;
@@ -120,7 +120,7 @@ inline
BRect::BRect()
:
left(0),
top(0),
top(0),
right(-1),
bottom(-1)
{
+5 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2010, Haiku, Inc. All rights reserved.
* Copyright 2006-2012, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _TEXT_CONTROL_H
@@ -9,6 +9,7 @@
#include <Control.h>
#include <TextView.h>
class BLayoutItem;
namespace BPrivate {
class _BTextInput_;
@@ -22,14 +23,14 @@ public:
BMessage* message,
uint32 resizeMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BTextControl(const char* name,
const char* label, const char* initialText,
BMessage* message,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BTextControl(const char* label,
const char* initialText,
BMessage* message);
BMessage* message);
virtual ~BTextControl();
BTextControl(BMessage* archive);
+7 -3
View File
@@ -294,9 +294,11 @@ private:
void _ResetTextRect();
void _HandleBackspace();
void _HandleArrowKey(uint32 inArrowKey);
void _HandleArrowKey(uint32 inArrowKey,
bool commandKeyDown = false);
void _HandleDelete();
void _HandlePageKey(uint32 inPageKey);
void _HandlePageKey(uint32 inPageKey,
bool commandKeyDown = false);
void _HandleAlphaKey(const char* bytes,
int32 numBytes);
@@ -451,8 +453,10 @@ private:
float fMinTextRectWidth;
LayoutData* fLayoutData;
int32 fLastClickOffset;
bool fInstalledNavigateWordwiseShortcuts;
bool fInstalledNavigateToTopOrBottomShortcuts;
uint32 _reserved[7];
uint32 _reserved[6];
};
#endif // _TEXTVIEW_H
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2009, Haiku, Inc. All rights reserved.
* Copyright 2001-2012, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _VIEW_H
@@ -537,6 +537,7 @@ public:
void SetExplicitMinSize(BSize size);
void SetExplicitMaxSize(BSize size);
void SetExplicitPreferredSize(BSize size);
void SetExplicitSize(BSize size);
void SetExplicitAlignment(BAlignment alignment);
BSize ExplicitMinSize() const;
@@ -753,4 +754,5 @@ BView::SetLowColor(uchar r, uchar g, uchar b, uchar a)
SetLowColor(color);
}
#endif // _VIEW_H
+1
View File
@@ -132,6 +132,7 @@ public:
BMessage* message);
void AddShortcut(uint32 key, uint32 modifiers,
BMessage* message, BHandler* target);
bool HasShortcut(uint32 key, uint32 modifiers);
void RemoveShortcut(uint32 key, uint32 modifiers);
void SetDefaultButton(BButton* button);
+9 -5
View File
@@ -1,15 +1,18 @@
/*
* Copyright 1994-1997 Mark Kilgard, All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Mark Kilgard
*/
#ifndef __glut_h__
#define __glut_h__
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
/* This program is freely distributable without licensing fees and is
provided without guarantee or warrantee expressed or implied. This
program is -not- in the public domain. */
#include <GL/gl.h>
#include <GL/glu.h>
#if defined(__MINGW32__)
#include <GL/mesa_wgl.h>
#endif
@@ -752,4 +755,5 @@ GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode);
}
#endif
#endif /* __glut_h__ */
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
* Copyright 2002-2012, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _ENTRY_H
@@ -50,6 +50,8 @@ public:
status_t InitCheck() const;
bool Exists() const;
const char* Name() const;
virtual status_t GetStat(struct stat* stat) const;
status_t SetTo(const BDirectory* dir, const char* path,
+4 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009, Haiku, Inc. All Rights Reserved.
* Copyright 2002-2012, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PATH_H
@@ -25,7 +25,7 @@ public:
BPath(const BEntry* entry);
BPath(const char* dir, const char* leaf = NULL,
bool normalize = false);
BPath(const BDirectory* dir,
BPath(const BDirectory* dir,
const char* leaf = NULL,
bool normalize = false);
@@ -37,7 +37,7 @@ public:
status_t SetTo(const BEntry* entry);
status_t SetTo(const char* path, const char* leaf = NULL,
bool normalize = false);
status_t SetTo(const BDirectory* dir,
status_t SetTo(const BDirectory* dir,
const char* leaf = NULL,
bool normalize = false);
void Unset();
@@ -47,6 +47,7 @@ public:
const char* Path() const;
const char* Leaf() const;
status_t GetParent(BPath* path) const;
bool IsAbsolute() const;
bool operator==(const BPath& item) const;
bool operator==(const char* path) const;
+1 -1
View File
@@ -220,7 +220,7 @@ extern int execle(const char *path, const char *arg , ... /*, char **envp */);
extern int exect(const char *path, char *const *argv);
extern int execvp(const char *file, char *const *argv);
extern void _exit(int status);
extern void _exit(int status) __attribute__ ((noreturn));
extern pid_t tcgetpgrp(int fd);
extern int tcsetpgrp(int fd, pid_t pgrpid);
+1 -1
View File
@@ -30,7 +30,7 @@ typedef struct {
void* converter;
char charset[64];
unsigned int count;
char data[1024 + 8]; // 1024 bytes for data, 8 for alignment space
char data[1024 + 8]; /* 1024 bytes for data, 8 for alignment space */
} mbstate_t;
+5 -5
View File
@@ -13,7 +13,7 @@
#include <InterfaceDefs.h>
static const int32 kNumColors = 32;
static const int32 kNumColors = 34;
struct server_read_only_memory {
rgb_color colors[kNumColors];
@@ -26,10 +26,10 @@ static inline int32
color_which_to_index(color_which which)
{
// NOTE: this must be kept in sync with InterfaceDefs.h color_which!
if (which <= B_CONTROL_MARK_COLOR)
if (which <= B_LIST_SELECTED_ITEM_TEXT_COLOR)
return which - 1;
if (which >= B_SUCCESS_COLOR && which <= B_FAILURE_COLOR)
return which - B_SUCCESS_COLOR + B_CONTROL_MARK_COLOR;
return which - B_SUCCESS_COLOR + B_LIST_SELECTED_ITEM_TEXT_COLOR;
return -1;
}
@@ -39,11 +39,11 @@ static inline color_which
index_to_color_which(int32 index)
{
if (index >= 0 && index < kNumColors) {
if ((color_which)index < B_CONTROL_MARK_COLOR)
if ((color_which)index < B_LIST_SELECTED_ITEM_TEXT_COLOR)
return (color_which)(index + 1);
else {
return (color_which)(index + B_SUCCESS_COLOR
- B_CONTROL_MARK_COLOR);
- B_LIST_SELECTED_ITEM_TEXT_COLOR);
}
}
@@ -1,6 +1,7 @@
/*
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
* Copyright 2008 Mika Lindqvist
* Copyright 2012 Fredrik Modéen [firstname]@[lastname].se
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _COMMAND_MANAGER_H
@@ -104,6 +105,7 @@ SingleParameterCommandRequest(uint8 ofg, uint8 ocf, PARAMETERTYPE parameter,
/* CONTROL BASEBAND */
void* buildReset(size_t* outsize);
void* buildReadLocalName(size_t* outsize);
void* buildReadScan(size_t* outsize);
void* buildWriteScan(uint8 scanmode, size_t* outsize);
void* buildReadClassOfDevice(size_t* outsize);
+39 -8
View File
@@ -12,6 +12,7 @@
/* raw exception frames */
struct iframe {
uint32 spsr;
uint32 r0;
uint32 r1;
uint32 r2;
@@ -25,20 +26,50 @@ struct iframe {
uint32 r10;
uint32 r11;
uint32 r12;
uint32 r13;
uint32 lr;
uint32 usr_sp;
uint32 usr_lr;
uint32 svc_sp;
uint32 svc_lr;
uint32 pc;
uint32 cpsr;
} _PACKED;
/**! Values for arch_cpu_info.arch */
enum {
ARCH_ARM_PRE_ARM7,
ARCH_ARM_v3,
ARCH_ARM_v4,
ARCH_ARM_v4T,
ARCH_ARM_v5,
ARCH_ARM_v5T,
ARCH_ARM_v5TE,
ARCH_ARM_v5TEJ,
ARCH_ARM_v6
};
typedef struct arch_cpu_info {
/* For a detailed interpretation of these values,
see "The System Control coprocessor",
"Main ID register" in your ARM ARM */
int implementor;
int part_number;
int revision;
int variant;
int arch;
} arch_cpu_info;
extern int arch_cpu_type;
extern int arch_fpu_type;
extern int arch_mmu_type;
extern int arch_platform;
extern int arch_machine;
#ifdef __cplusplus
extern "C" {
#endif
extern addr_t arm_get_far(void);
extern int32 arm_get_fsr(void);
extern int mmu_read_c1(void);
extern int mmu_write_c1(int val);
#ifdef __cplusplus
};
#endif
#endif // !_ASSEMBLER
+2 -2
View File
@@ -77,8 +77,8 @@
#define VECT_BASE 0xFFFF0000
#define VECT_SIZE SIZE_4K
#define PERIPHERAL_BASE BCM2708_PERIPHERAL_BASE
#define PERIPHERAL_SIZE 0xFFFFFF
#define DEVICE_BASE BCM2708_PERIPHERAL_BASE
#define DEVICE_SIZE 0xFFFFFF
#define SDRAM_BASE BCM2708_SDRAM_BASE
#define SDRAM_SIZE 0x4000000
@@ -32,6 +32,7 @@
#define IA32_MSR_SYSENTER_CS 0x174
#define IA32_MSR_SYSENTER_ESP 0x175
#define IA32_MSR_SYSENTER_EIP 0x176
#define IA32_MSR_ENERGY_PERF_BIAS 0x1b0
#define IA32_MSR_MTRR_DEFAULT_TYPE 0x2ff
#define IA32_MSR_MTRR_PHYSICAL_BASE_0 0x200
#define IA32_MSR_MTRR_PHYSICAL_MASK_0 0x201
@@ -12,6 +12,8 @@
struct platform_stage2_args {
void *boot_tgz_data;
uint32 boot_tgz_size;
void *fdt_data;
uint32 fdt_size;
};
#endif /* KERNEL_BOOT_PLATFORM_UBOOT_STAGE2_H */
+14 -11
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Copyright 2002-2012, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
@@ -16,18 +16,21 @@
extern "C" {
#endif
status_t devfs_unpublish_file_device(const char *path);
status_t devfs_publish_file_device(const char *path, const char *filePath);
status_t devfs_unpublish_file_device(const char* path);
status_t devfs_publish_file_device(const char* path, const char* filePath);
status_t devfs_unpublish_partition(const char *path);
status_t devfs_publish_partition(const char *name, const partition_info *info);
status_t devfs_rename_partition(const char *devicePath, const char *oldName,
const char *newName);
status_t devfs_unpublish_partition(const char* path);
status_t devfs_publish_partition(const char* name, const partition_info* info);
status_t devfs_rename_partition(const char* devicePath, const char* oldName,
const char* newName);
status_t devfs_unpublish_device(const char *path, bool disconnect);
status_t devfs_publish_device(const char *path, device_hooks *calls);
status_t devfs_publish_directory(const char *path);
status_t devfs_rescan_driver(const char *driverName);
status_t devfs_unpublish_device(const char* path, bool disconnect);
status_t devfs_publish_device(const char* path, device_hooks* calls);
status_t devfs_publish_directory(const char* path);
status_t devfs_rescan_driver(const char* driverName);
void devfs_compute_geometry_size(device_geometry* geometry, uint64 blockCount,
uint32 blockSize);
#ifdef __cplusplus
}
+29 -12
View File
@@ -1,28 +1,45 @@
/*
* Copyright 2007-2009 Haiku, Inc.
* Copyright 2007-2012 Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ryan Leavengood, leavengood@gmail.com
* Ryan Leavengood <leavengood@gmail.com>
* John Scipione <jscipione@gmail.com>
*/
#ifndef B_ABOUT_WINDOW_H
#define B_ABOUT_WINDOW_H
#include <String.h>
#include <GroupView.h>
#include <Window.h>
#include <View.h>
class BAboutWindow {
public:
BAboutWindow(const char *appName, int32 firstCopyrightYear,
const char **authors, const char *extraInfo = NULL);
virtual ~BAboutWindow();
class AboutView;
class BPoint;
class BHandler;
void Show();
class BAboutWindow : public BWindow {
public:
BAboutWindow(const char* appName,
const char* signature);
virtual ~BAboutWindow();
private:
BString* fAppName;
BString* fText;
virtual bool QuitRequested();
BPoint AboutPosition(float width, float height);
void AddDescription(const char* description);
void AddCopyright(int32 firstCopyrightYear,
const char* copyrightHolder,
const char** extraCopyrights = NULL);
void AddAuthors(const char** authors);
void AddSpecialThanks(const char** thanks);
void AddVersionHistory(const char** history);
void AddExtraInfo(const char* extraInfo);
private:
AboutView* fAboutView;
BHandler* fCaller;
};
#endif // B_ABOUT_WINDOW_H
+34
View File
@@ -0,0 +1,34 @@
/*
* Copyright 2012, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
#ifndef PROMPT_WINDOW_H_
#define PROMPT_WINDOW_H_
#include <Messenger.h>
#include <Window.h>
class BTextControl;
class PromptWindow : public BWindow
{
public:
// PromptWindow takes ownership of message
PromptWindow(const char* title, const char* label, BMessenger target,
BMessage* message = NULL);
~PromptWindow();
virtual void MessageReceived(BMessage* message);
status_t SetTarget(BMessenger messenger);
status_t SetMessage(BMessage* message);
private:
BTextControl* fTextControl;
BMessenger fTarget;
BMessage* fMessage;
};
#endif // PROMPT_WINDOW_H_
+12 -2
View File
@@ -140,12 +140,22 @@ public:
bool operator==(const BReference<Type>& other) const
{
return (fObject == other.fObject);
return fObject == other.fObject;
}
bool operator==(const Type* other) const
{
return fObject == other;
}
bool operator!=(const BReference<Type>& other) const
{
return (fObject != other.fObject);
return fObject != other.fObject;
}
bool operator!=(const Type* other) const
{
return fObject != other;
}
private:
+63 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Copyright 2004-2012, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
@@ -12,6 +12,7 @@
#include <OS.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -27,6 +28,58 @@ int32 get_rounded_cpu_speed(void);
#endif
#if defined(__INTEL__) || defined(__x86_64__)
/*! Tries to parse an Intel CPU ID string to match our usual naming scheme.
Note, this function is not thread safe, and must only be called once
at a time.
*/
static const char*
parse_intel(const char* name)
{
static char buffer[49];
// ignore initial spaces
int index = 0;
for (; name[index] != '\0'; index++) {
if (name[index] != ' ')
break;
}
// ignore vendor
for (; name[index] != '\0'; index++) {
if (name[index] == ' ') {
index++;
break;
}
}
// parse model
int outIndex = 0;
for (; name[index] != '\0'; index++) {
if (!strncmp(&name[index], "(R)", 3)) {
outIndex += strlcpy(&buffer[outIndex], "®",
sizeof(buffer) - outIndex);
index += 2;
} else if (!strncmp(&name[index], "(TM)", 4)) {
outIndex += strlcpy(&buffer[outIndex], "",
sizeof(buffer) - outIndex);
index += 3;
} else if (!strncmp(&name[index], " CPU", 4)) {
// Cut out the CPU string
index += 3;
} else if (!strncmp(&name[index], " @", 2)) {
// Cut off the remainder
break;
} else
buffer[outIndex++] = name[index];
}
buffer[outIndex] = '\0';
return buffer;
}
#endif
const char *
get_cpu_vendor_string(enum cpu_types type)
{
@@ -61,7 +114,7 @@ get_cpu_vendor_string(enum cpu_types type)
#if defined(__INTEL__) || defined(__x86_64__)
/* Parameter 'name' needs to point to an allocated array of 49 characters. */
/*! Parameter 'name' needs to point to an allocated array of 49 characters. */
void
get_cpuid_model_string(char *name)
{
@@ -139,6 +192,8 @@ get_cpu_model_string(system_info *info)
return "604";
case B_CPU_PPC_604e:
return "604e";
default:
return NULL;
#endif /* __POWERPC__ */
#if defined(__INTEL__) || defined(__x86_64__)
case B_CPU_x86:
@@ -342,10 +397,15 @@ get_cpu_model_string(system_info *info)
/* National Semiconductor */
case B_CPU_NATIONAL_GEODE_GX1:
return "Geode GX1";
#endif /* __INTEL__ || __x86_64__ */
default:
if ((info->cpu_type & B_CPU_x86_VENDOR_MASK) == B_CPU_INTEL_x86) {
// Fallback to manual parsing of the model string
get_cpuid_model_string(cpuidName);
return parse_intel(cpuidName);
}
return NULL;
#endif /* __INTEL__ || __x86_64__ */
}
}
+6 -6
View File
@@ -80,12 +80,12 @@ class BNavMenu : public BSlowMenu {
BWindow *parentWindow = NULL, const BObjectList<BString> *list = NULL);
// parentWindow, if specified, will be closed if nav menu item invoked
// with option held down
virtual ~BNavMenu();
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
void SetNavDir(const entry_ref *);
void ForceRebuild();
bool NeedsToRebuild() const;
@@ -96,7 +96,7 @@ class BNavMenu : public BSlowMenu {
BMessenger Target();
void SetTypesList(const BObjectList<BString> *list);
const BObjectList<BString> *TypesList() const;
const BObjectList<BString> *TypesList() const;
void AddNavDir(const Model *model, uint32 what, BHandler *target,
bool populateSubmenu);
@@ -121,7 +121,7 @@ class BNavMenu : public BSlowMenu {
protected:
virtual bool StartBuildingItemList();
virtual bool AddNextItem();
virtual void DoneBuildingItemList();
virtual void DoneBuildingItemList();
virtual void ClearMenuBuildingState();
void BuildVolumeMenu();
@@ -142,7 +142,7 @@ class BNavMenu : public BSlowMenu {
EntryListBase *fContainer;
bool fIteratingDesktop;
const BObjectList<BString> *fTypesList;
BObjectList<BString> *fTypesList;
TrackingHookData fTrackingHook;
};